forked from wickedwaifus/wicked-waifus-rs
push for xavo review
This commit is contained in:
parent
b3c5e03786
commit
ce265b89ca
4 changed files with 464 additions and 431 deletions
80
wicked-waifus-game-server/src/logic/handler/action.rs
Normal file
80
wicked-waifus-game-server/src/logic/handler/action.rs
Normal file
|
@ -0,0 +1,80 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use wicked_waifus_data::pb_components::action::{CollectParams, UnlockTeleportTrigger};
|
||||
use wicked_waifus_protocol::{ItemRewardNotify, NormalItemUpdateNotify, RewardItemInfo, WR};
|
||||
|
||||
use crate::logic::{
|
||||
player::{ItemUsage, Player},
|
||||
};
|
||||
|
||||
pub fn collect_action(
|
||||
player: &mut Player,
|
||||
_entity_id: i64,
|
||||
level_entity_data: &wicked_waifus_data::LevelEntityConfigData,
|
||||
template_config: &wicked_waifus_data::TemplateConfigData,
|
||||
_: CollectParams
|
||||
) {
|
||||
if let Some(reward_component) = level_entity_data
|
||||
.components_data
|
||||
.reward_component
|
||||
.as_ref()
|
||||
.or(template_config.components_data.reward_component.as_ref())
|
||||
{
|
||||
if reward_component.disabled.unwrap_or(false) {
|
||||
return;
|
||||
}
|
||||
// TODO: check the use of reward_type and drop_on_event
|
||||
// Seems type 0 is reward from preview, while 1 and 2 is unknown
|
||||
if let Some(reward_id) = reward_component.reward_id {
|
||||
let drop = wicked_waifus_data::drop_package_data::get(&reward_id).unwrap();
|
||||
let usages = drop
|
||||
.drop_preview
|
||||
.iter()
|
||||
.map(|(&id, &quantity)| ItemUsage { id, quantity })
|
||||
.collect::<Vec<_>>();
|
||||
let updated_items = player.inventory.add_items(&usages);
|
||||
let normal_item_list = player
|
||||
.inventory
|
||||
.to_normal_item_list_filtered(updated_items.keys().cloned().collect::<Vec<i32>>());
|
||||
player.notify(NormalItemUpdateNotify {
|
||||
normal_item_list,
|
||||
no_tips: false,
|
||||
});
|
||||
// UpdateHandBookActiveStateMapNotify
|
||||
let mut rewards: HashMap<i32, WR> = HashMap::new();
|
||||
rewards.insert(
|
||||
0,
|
||||
WR {
|
||||
item_list: drop
|
||||
.drop_preview
|
||||
.iter()
|
||||
.map(|(&id, &quantity)| RewardItemInfo {
|
||||
show_plan_id: 0, // TODO: Check how to get this
|
||||
item_id: id,
|
||||
count: quantity,
|
||||
incr_id: 0,
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
},
|
||||
);
|
||||
player.notify(ItemRewardNotify {
|
||||
drop_id: reward_id,
|
||||
reason: 15000,
|
||||
magnification: 1,
|
||||
reward_items: rewards,
|
||||
});
|
||||
}
|
||||
// TODO: Should we remove entity?? get pcap
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn unlock_teleport_trigger_action(
|
||||
player: &mut Player,
|
||||
_entity_id: i64,
|
||||
_level_entity_data: &wicked_waifus_data::LevelEntityConfigData,
|
||||
_template_config: &wicked_waifus_data::TemplateConfigData,
|
||||
action: UnlockTeleportTrigger
|
||||
) {
|
||||
player.unlock_teleport(action.teleport_id)
|
||||
}
|
|
@ -2,8 +2,8 @@ use wicked_waifus_protocol::{EntityAccessInfo, EntityAccessRangeRequest, EntityA
|
|||
|
||||
use wicked_waifus_data::pb_components::option::OptionType;
|
||||
|
||||
use crate::logic::handler::handle_action;
|
||||
use crate::{logic, logic::ecs::component::ComponentContainer, logic::player::Player, query_components};
|
||||
use crate::logic::utils::action_utils::perform_action;
|
||||
use crate::logic::utils::condition_utils::check_condition;
|
||||
|
||||
pub fn on_entity_active_request(
|
||||
|
@ -190,7 +190,7 @@ pub fn on_entity_interact_request(
|
|||
match option_type {
|
||||
OptionType::Actions(actions) => {
|
||||
for action in actions.actions {
|
||||
perform_action(player, request.entity_id, &entity, template_config, action);
|
||||
handle_action(player, request.entity_id, &entity, template_config, action);
|
||||
}
|
||||
}
|
||||
OptionType::Flow(_) => {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
pub use action::*;
|
||||
pub use attribute::*;
|
||||
pub use advice::*;
|
||||
pub use animal::*;
|
||||
|
@ -21,6 +22,7 @@ pub use skill::*;
|
|||
pub use teleport::*;
|
||||
pub use tutorial::*;
|
||||
|
||||
mod action;
|
||||
mod attribute;
|
||||
mod advice;
|
||||
mod animal;
|
||||
|
@ -113,7 +115,7 @@ macro_rules! handle_push {
|
|||
}
|
||||
|
||||
macro_rules! handle_action {
|
||||
($($variant:ident);* $(,)?) => {
|
||||
($($variant:ident),*) => {
|
||||
use wicked_waifus_data::pb_components::action::Action;
|
||||
use crate::logic::player::Player;
|
||||
|
||||
|
@ -129,10 +131,10 @@ macro_rules! handle_action {
|
|||
$(
|
||||
Action::$variant(inner) => {
|
||||
paste::paste! {
|
||||
[<$variant:snake _action>](player, entity_id, level_entity_data, template_config, inner)
|
||||
[<$variant:snake _action>](player, entity_id, level_entity_data, template_config, inner.params)
|
||||
}
|
||||
},
|
||||
_ => tracing::debug!("hi")
|
||||
_ => tracing::debug!("hi"),
|
||||
)*
|
||||
}
|
||||
}
|
||||
|
@ -318,190 +320,190 @@ handle_push! {
|
|||
}
|
||||
|
||||
handle_action! {
|
||||
ExecBattleAction(_);
|
||||
WaitBattleCondition(_);
|
||||
SetBattleState(_);
|
||||
Action::PlayFlow(action) => unimplemented_action! { action },
|
||||
Action::Collect(_) => collect_action(player, level_entity_data, template_config),
|
||||
Action::LeisureInteract(action) => unimplemented_action! { action },
|
||||
Action::UnlockTeleportTrigger(action) => unlock_teleport_trigger(player, action.params),
|
||||
Action::EnableTemporaryTeleport(action) => unimplemented_action! { action },
|
||||
Action::OpenSystemBoard(action) => unimplemented_action! { action },
|
||||
Action::OpenSystemFunction(action) => unimplemented_action! { action },
|
||||
Action::ChangeSelfEntityState(action) => change_self_entity_state(player, entity_id, level_entity_data, template_config, action.params),
|
||||
Action::SetPlayerOperationRestriction(action) => unimplemented_action! { action },
|
||||
Action::Wait(action) => unimplemented_action! { action },
|
||||
Action::ChangeEntityState(action) => unimplemented_action! { action },
|
||||
Action::Log(action) => unimplemented_action! { action },
|
||||
Action::EnableNearbyTracking(action) => unimplemented_action! { action },
|
||||
Action::TeleportDungeon(action) => unimplemented_action! { action },
|
||||
Action::DestroySelf(action) => unimplemented_action! { action },
|
||||
Action::CameraLookAt(action) => unimplemented_action! { action },
|
||||
Action::StopCameraLookAt(action) => unimplemented_action! { action },
|
||||
Action::EnterOrbitalCamera(action) => unimplemented_action! { action },
|
||||
Action::ExitOrbitalCamera(action) => unimplemented_action! { action },
|
||||
Action::SendAiEvent(action) => unimplemented_action! { action },
|
||||
Action::SetInteractionLockState(action) => unimplemented_action! { action },
|
||||
Action::AwakeEntity(action) => unimplemented_action! { action },
|
||||
Action::ChangeLiftTarget(action) => unimplemented_action! { action },
|
||||
Action::CalculateVar(action) => unimplemented_action! { action },
|
||||
Action::AddBuffToPlayer(action) => unimplemented_action! { action },
|
||||
Action::RemoveBuffFromPlayer(action) => unimplemented_action! { action },
|
||||
Action::AddBuffToEntity(action) => unimplemented_action! { action },
|
||||
Action::RemoveBuffFromEntity(action) => unimplemented_action! { action },
|
||||
Action::Prompt(action) => unimplemented_action! { action },
|
||||
Action::SetEntityVisible(action) => unimplemented_action! { action },
|
||||
Action::DestroyEntity(action) => unimplemented_action! { action },
|
||||
Action::GuideTrigger(action) => unimplemented_action! { action },
|
||||
Action::TriggerCameraShake(action) => unimplemented_action! { action },
|
||||
Action::SetVar(action) => unimplemented_action! { action },
|
||||
Action::VehicleEnter(action) => unimplemented_action! { action },
|
||||
Action::VehicleExitPlayer(action) => unimplemented_action! { action },
|
||||
Action::LockEntity(action) => unimplemented_action! { action },
|
||||
Action::UnlockEntity(action) => unimplemented_action! { action },
|
||||
Action::CommonTip(action) => unimplemented_action! { action },
|
||||
Action::CommonTip2(action) => unimplemented_action! { action },
|
||||
Action::PostAkEvent(action) => unimplemented_action! { action },
|
||||
Action::VehicleEnterNpc(action) => unimplemented_action! { action },
|
||||
Action::VehicleExitNpc(action) => unimplemented_action! { action },
|
||||
Action::PlayerLookAt(action) => unimplemented_action! { action },
|
||||
Action::PlayBubble(action) => unimplemented_action! { action },
|
||||
Action::AddPlayBubble(action) => unimplemented_action! { action },
|
||||
Action::ClearPlayBubble(action) => unimplemented_action! { action },
|
||||
Action::ExecRiskHarvestEffect(action) => unimplemented_action! { action },
|
||||
Action::EnableLevelPlay(action) => unimplemented_action! { action },
|
||||
Action::ClaimLevelPlayReward(action) => unimplemented_action! { action },
|
||||
Action::SettlementDungeon(action) => unimplemented_action! { action },
|
||||
Action::ExitDungeon(action) => unimplemented_action! { action },
|
||||
Action::FinishDungeon(action) => unimplemented_action! { action },
|
||||
Action::RecordDungeonEvent(action) => unimplemented_action! { action },
|
||||
Action::RecoverDurability(action) => unimplemented_action! { action },
|
||||
Action::FadeInScreen(action) => unimplemented_action! { action },
|
||||
Action::FadeOutScreen(action) => unimplemented_action! { action },
|
||||
Action::ChangeNpcPerformState(action) => unimplemented_action! { action },
|
||||
Action::EntityTurnTo(action) => unimplemented_action! { action },
|
||||
Action::EntityLookAt(action) => unimplemented_action! { action },
|
||||
Action::ToggleMapMarkState(action) => unimplemented_action! { action },
|
||||
Action::RandomVar(action) => unimplemented_action! { action },
|
||||
Action::ModifySceneItemAttributeTag(action) => unimplemented_action! { action },
|
||||
Action::VehicleWaterfallClimbing(action) => unimplemented_action! { action },
|
||||
Action::VehicleTeleport(action) => unimplemented_action! { action },
|
||||
Action::RogueGotoNextFloor(action) => unimplemented_action! { action },
|
||||
Action::RogueReceiveReward(action) => unimplemented_action! { action },
|
||||
Action::RogueSelectRoom(action) => unimplemented_action! { action },
|
||||
Action::RogueActivatePortal(action) => unimplemented_action! { action },
|
||||
Action::MowingTowerGotoNextFloor(action) => unimplemented_action! { action },
|
||||
Action::SlashAndTowerGotoNextFloor(action) => unimplemented_action! { action },
|
||||
Action::PlayMontage(action) => unimplemented_action! { action },
|
||||
Action::OpenSystemBoardWithReturn(action) => unimplemented_action! { action },
|
||||
Action::UnlockSystemItem(action) => unimplemented_action! { action },
|
||||
Action::SetSportsState(action) => unimplemented_action! { action },
|
||||
Action::OpenSimpleGameplay(action) => unimplemented_action! { action },
|
||||
Action::PlayEffect(action) => unimplemented_action! { action },
|
||||
Action::PlayEffect2(action) => unimplemented_action! { action },
|
||||
Action::RestorePlayerCameraAdjustment(action) => unimplemented_action! { action },
|
||||
Action::AdjustPlayerCamera(action) => unimplemented_action! { action },
|
||||
Action::SetPlayerPos(action) => unimplemented_action! { action },
|
||||
Action::MoveWithSpline(action) => unimplemented_action! { action },
|
||||
Action::EnableSplineMoveModel(action) => unimplemented_action! { action },
|
||||
Action::ToggleScanSplineEffect(action) => unimplemented_action! { action },
|
||||
Action::MoveSceneItem(action) => unimplemented_action! { action },
|
||||
Action::StopSceneItemMove(action) => unimplemented_action! { action },
|
||||
Action::FireBullet(action) => unimplemented_action! { action },
|
||||
Action::ClearFishingCabinInSaleItems(action) => unimplemented_action! { action },
|
||||
Action::AcceptFishingEntrust(action) => unimplemented_action! { action },
|
||||
Action::DestroyFishingBoat(action) => unimplemented_action! { action },
|
||||
Action::SetJigsawItem(action) => unimplemented_action! { action },
|
||||
Action::SetJigsawFoundation(action) => unimplemented_action! { action },
|
||||
Action::SetTeleControl(action) => unimplemented_action! { action },
|
||||
Action::SetEntityClientVisible(action) => unimplemented_action! { action },
|
||||
Action::ToggleHighlightExploreUi(action) => unimplemented_action! { action },
|
||||
Action::ExecAlertSystemAction(action) => unimplemented_action! { action },
|
||||
Action::AddFlowInteractOption(action) => unimplemented_action! { action },
|
||||
Action::RemoveFlowInteractOption(action) => unimplemented_action! { action },
|
||||
Action::EnableHostility(action) => unimplemented_action! { action },
|
||||
Action::ChangePhantomFormation(action) => unimplemented_action! { action },
|
||||
Action::RestorePhantomFormation(action) => unimplemented_action! { action },
|
||||
Action::ChangeTimer(action) => unimplemented_action! { action },
|
||||
Action::ToggleTimerPauseState(action) => unimplemented_action! { action },
|
||||
Action::ChangeFightTeam(action) => unimplemented_action! { action },
|
||||
Action::AddTrialFollowShooter(action) => unimplemented_action! { action },
|
||||
Action::RemoveTrialFollowShooter(action) => unimplemented_action! { action },
|
||||
Action::AddTrialCharacter(action) => unimplemented_action! { action },
|
||||
Action::RemoveTrialCharacter(action) => unimplemented_action! { action },
|
||||
Action::SetAreaState(action) => unimplemented_action! { action },
|
||||
Action::SwitchSubLevels(action) => unimplemented_action! { action },
|
||||
Action::ChangeTeamPosition(action) => unimplemented_action! { action },
|
||||
Action::GetItem(action) => unimplemented_action! { action },
|
||||
Action::CreatePrefab(action) => unimplemented_action! { action },
|
||||
Action::DestroyPrefab(action) => unimplemented_action! { action },
|
||||
Action::CompleteGuide(action) => unimplemented_action! { action },
|
||||
Action::PlayDynamicSettlement(action) => unimplemented_action! { action },
|
||||
Action::UsePhantomSkill(action) => unimplemented_action! { action },
|
||||
Action::HideTargetRange(action) => unimplemented_action! { action },
|
||||
Action::ChangeOtherState(action) => unimplemented_action! { action },
|
||||
Action::SetRegionConfig(action) => unimplemented_action! { action },
|
||||
Action::SetReviveRegion(action) => unimplemented_action! { action },
|
||||
Action::ExecResurrection(action) => unimplemented_action! { action },
|
||||
Action::ShowTargetRange(action) => unimplemented_action! { action },
|
||||
Action::SetTime(action) => unimplemented_action! { action },
|
||||
Action::SetTimeLockState(action) => unimplemented_action! { action },
|
||||
Action::EnableSystem(action) => unimplemented_action! { action },
|
||||
Action::EnableAoiNotify(action) => unimplemented_action! { action },
|
||||
Action::SetForceLock(action) => unimplemented_action! { action },
|
||||
Action::PlayRegisteredMontage(action) => unimplemented_action! { action },
|
||||
Action::SetAudioState(action) => unimplemented_action! { action },
|
||||
Action::HideGroup(action) => unimplemented_action! { action },
|
||||
Action::ShowHidedGroup(action) => unimplemented_action! { action },
|
||||
Action::HideSpecificEntities(action) => unimplemented_action! { action },
|
||||
Action::ShowSpecificEntities(action) => unimplemented_action! { action },
|
||||
Action::RemovePreloadResource(action) => unimplemented_action! { action },
|
||||
Action::Preload(action) => unimplemented_action! { action },
|
||||
Action::EnableAI(action) => unimplemented_action! { action },
|
||||
Action::SwitchDataLayers(action) => unimplemented_action! { action },
|
||||
Action::DestroyQuest(action) => unimplemented_action! { action },
|
||||
Action::DestroyQuestItem(action) => unimplemented_action! { action },
|
||||
Action::PromptQuestChapterUI(action) => unimplemented_action! { action },
|
||||
Action::TakePlotPhoto(action) => unimplemented_action! { action },
|
||||
Action::SetWuYinQuState(action) => unimplemented_action! { action },
|
||||
Action::RunActions(action) => unimplemented_action! { action },
|
||||
Action::ManualOccupations(action) => unimplemented_action! { action },
|
||||
Action::SetWeather(action) => unimplemented_action! { action },
|
||||
Action::SendNpcMail(action) => unimplemented_action! { action },
|
||||
Action::EnableFunction(action) => unimplemented_action! { action },
|
||||
Action::FocusOnMapMark(action) => unimplemented_action! { action },
|
||||
Action::CharacterLookAt(action) => unimplemented_action! { action },
|
||||
Action::AddGuestCharacter(action) => unimplemented_action! { action },
|
||||
Action::RemoveGuestCharacter(action) => unimplemented_action! { action },
|
||||
Action::TeleportToAndEnterVehicle(action) => unimplemented_action! { action },
|
||||
Action::SetAreaTimeState(action) => unimplemented_action! { action },
|
||||
Action::ResetPlayerCameraFocus(action) => unimplemented_action! { action },
|
||||
Action::ResetLevelPlay(action) => unimplemented_action! { action },
|
||||
Action::VehicleSprint(action) => unimplemented_action! { action },
|
||||
Action::VehicleMoveWithPathLine(action) => unimplemented_action! { action },
|
||||
Action::ClientPreEnableSubLevels(action) => unimplemented_action! { action },
|
||||
Action::GuestOperateUiAnimation(action) => unimplemented_action! { action },
|
||||
Action::ChangeEntityCamp(action) => unimplemented_action! { action },
|
||||
Action::NewMoveWithSpline(action) => unimplemented_action! { action },
|
||||
Action::DangoAbyssActivatePortal(action) => unimplemented_action! { action },
|
||||
Action::DangoAbyssCreateRewardTreasureBox(action) => unimplemented_action! { action },
|
||||
Action::DangoAbyssGotoNextFloor(action) => unimplemented_action! { action },
|
||||
Action::DangoAbyssReceiveReward(action) => unimplemented_action! { action },
|
||||
Action::SummonEntity(action) => unimplemented_action! { action },
|
||||
Action::GetRewardByInteract(action) => unimplemented_action! { action },
|
||||
Action::OpenQte(action) => unimplemented_action! { action },
|
||||
Action::ActiveAntiGravitySafePoint(action) => unimplemented_action! { action },
|
||||
Action::BvbPlayDialog(action) => unimplemented_action! { action },
|
||||
Action::BvbSendSystemEvent(action) => unimplemented_action! { action },
|
||||
Action::BvbSendAiEvent(action) => unimplemented_action! { action },
|
||||
Action::BvbPlayerOperationConstraint(action) => unimplemented_action! { action },
|
||||
Action::ExecClientBattleAction(action) => unimplemented_action! { action },
|
||||
Action::TriggerSpecificScanEffect(action) => unimplemented_action! { action },
|
||||
Action::SetActorVar(action) => unimplemented_action! { action },
|
||||
Action::RunActorCustomEvent(action) => unimplemented_action! { action },
|
||||
Action::StopUiScreenEffect(action) => unimplemented_action! { action },
|
||||
Action::StopNewMoveWithSpline(action) => unimplemented_action! { action },
|
||||
Action::RequestSystemFunctiony
|
||||
ExecBattleAction,
|
||||
WaitBattleCondition,
|
||||
SetBattleState,
|
||||
PlayFlow,
|
||||
Collect,
|
||||
LeisureInteract,
|
||||
UnlockTeleportTrigger,
|
||||
EnableTemporaryTeleport,
|
||||
OpenSystemBoard,
|
||||
OpenSystemFunction,
|
||||
ChangeSelfEntityState,
|
||||
SetPlayerOperationRestriction,
|
||||
Wait,
|
||||
ChangeEntityState,
|
||||
Log,
|
||||
EnableNearbyTracking,
|
||||
TeleportDungeon,
|
||||
DestroySelf,
|
||||
CameraLookAt,
|
||||
StopCameraLookAt,
|
||||
EnterOrbitalCamera,
|
||||
ExitOrbitalCamera,
|
||||
SendAiEvent,
|
||||
SetInteractionLockState,
|
||||
AwakeEntity,
|
||||
ChangeLiftTarget,
|
||||
CalculateVar,
|
||||
AddBuffToPlayer,
|
||||
RemoveBuffFromPlayer,
|
||||
AddBuffToEntity,
|
||||
RemoveBuffFromEntity,
|
||||
Prompt,
|
||||
SetEntityVisible,
|
||||
DestroyEntity,
|
||||
GuideTrigger,
|
||||
TriggerCameraShake,
|
||||
SetVar,
|
||||
VehicleEnter,
|
||||
VehicleExitPlayer,
|
||||
LockEntity,
|
||||
UnlockEntity,
|
||||
CommonTip,
|
||||
CommonTip2,
|
||||
PostAkEvent,
|
||||
VehicleEnterNpc,
|
||||
VehicleExitNpc,
|
||||
PlayerLookAt,
|
||||
PlayBubble,
|
||||
AddPlayBubble,
|
||||
ClearPlayBubble,
|
||||
ExecRiskHarvestEffect,
|
||||
EnableLevelPlay,
|
||||
ClaimLevelPlayReward,
|
||||
SettlementDungeon,
|
||||
ExitDungeon,
|
||||
FinishDungeon,
|
||||
RecordDungeonEvent,
|
||||
RecoverDurability,
|
||||
FadeInScreen,
|
||||
FadeOutScreen,
|
||||
ChangeNpcPerformState,
|
||||
EntityTurnTo,
|
||||
EntityLookAt,
|
||||
ToggleMapMarkState,
|
||||
RandomVar,
|
||||
ModifySceneItemAttributeTag,
|
||||
VehicleWaterfallClimbing,
|
||||
VehicleTeleport,
|
||||
RogueGotoNextFloor,
|
||||
RogueReceiveReward,
|
||||
RogueSelectRoom,
|
||||
RogueActivatePortal,
|
||||
MowingTowerGotoNextFloor,
|
||||
SlashAndTowerGotoNextFloor,
|
||||
PlayMontage,
|
||||
OpenSystemBoardWithReturn,
|
||||
UnlockSystemItem,
|
||||
SetSportsState,
|
||||
OpenSimpleGameplay,
|
||||
PlayEffect,
|
||||
PlayEffect2,
|
||||
RestorePlayerCameraAdjustment,
|
||||
AdjustPlayerCamera,
|
||||
SetPlayerPos,
|
||||
MoveWithSpline,
|
||||
EnableSplineMoveModel,
|
||||
ToggleScanSplineEffect,
|
||||
MoveSceneItem,
|
||||
StopSceneItemMove,
|
||||
FireBullet,
|
||||
ClearFishingCabinInSaleItems,
|
||||
AcceptFishingEntrust,
|
||||
DestroyFishingBoat,
|
||||
SetJigsawItem,
|
||||
SetJigsawFoundation,
|
||||
SetTeleControl,
|
||||
SetEntityClientVisible,
|
||||
ToggleHighlightExploreUi,
|
||||
ExecAlertSystemAction,
|
||||
AddFlowInteractOption,
|
||||
RemoveFlowInteractOption,
|
||||
EnableHostility,
|
||||
ChangePhantomFormation,
|
||||
RestorePhantomFormation,
|
||||
ChangeTimer,
|
||||
ToggleTimerPauseState,
|
||||
ChangeFightTeam,
|
||||
AddTrialFollowShooter,
|
||||
RemoveTrialFollowShooter,
|
||||
AddTrialCharacter,
|
||||
RemoveTrialCharacter,
|
||||
SetAreaState,
|
||||
SwitchSubLevels,
|
||||
ChangeTeamPosition,
|
||||
GetItem,
|
||||
CreatePrefab,
|
||||
DestroyPrefab,
|
||||
CompleteGuide,
|
||||
PlayDynamicSettlement,
|
||||
UsePhantomSkill,
|
||||
HideTargetRange,
|
||||
ChangeOtherState,
|
||||
SetRegionConfig,
|
||||
SetReviveRegion,
|
||||
ExecResurrection,
|
||||
ShowTargetRange,
|
||||
SetTime,
|
||||
SetTimeLockState,
|
||||
EnableSystem,
|
||||
EnableAoiNotify,
|
||||
SetForceLock,
|
||||
PlayRegisteredMontage,
|
||||
SetAudioState,
|
||||
HideGroup,
|
||||
ShowHidedGroup,
|
||||
HideSpecificEntities,
|
||||
ShowSpecificEntities,
|
||||
RemovePreloadResource,
|
||||
Preload,
|
||||
EnableAI,
|
||||
SwitchDataLayers,
|
||||
DestroyQuest,
|
||||
DestroyQuestItem,
|
||||
PromptQuestChapterUI,
|
||||
TakePlotPhoto,
|
||||
SetWuYinQuState,
|
||||
RunActions,
|
||||
ManualOccupations,
|
||||
SetWeather,
|
||||
SendNpcMail,
|
||||
EnableFunction,
|
||||
FocusOnMapMark,
|
||||
CharacterLookAt,
|
||||
AddGuestCharacter,
|
||||
RemoveGuestCharacter,
|
||||
TeleportToAndEnterVehicle,
|
||||
SetAreaTimeState,
|
||||
ResetPlayerCameraFocus,
|
||||
ResetLevelPlay,
|
||||
VehicleSprint,
|
||||
VehicleMoveWithPathLine,
|
||||
ClientPreEnableSubLevels,
|
||||
GuestOperateUiAnimation,
|
||||
ChangeEntityCamp,
|
||||
NewMoveWithSpline,
|
||||
DangoAbyssActivatePortal,
|
||||
DangoAbyssCreateRewardTreasureBox,
|
||||
DangoAbyssGotoNextFloor,
|
||||
DangoAbyssReceiveReward,
|
||||
SummonEntity,
|
||||
GetRewardByInteract,
|
||||
OpenQte,
|
||||
ActiveAntiGravitySafePoint,
|
||||
BvbPlayDialog,
|
||||
BvbSendSystemEvent,
|
||||
BvbSendAiEvent,
|
||||
BvbPlayerOperationConstraint,
|
||||
ExecClientBattleAction,
|
||||
TriggerSpecificScanEffect,
|
||||
SetActorVar,
|
||||
RunActorCustomEvent,
|
||||
StopUiScreenEffect,
|
||||
StopNewMoveWithSpline,
|
||||
RequestSystemFunction
|
||||
}
|
||||
|
||||
pub fn handle_logic_message(player: &mut super::player::Player, msg: Message) {
|
||||
|
|
|
@ -19,249 +19,200 @@ macro_rules! unimplemented_action {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn perform_action(player: &mut Player,
|
||||
entity_id: i64,
|
||||
level_entity_data: &wicked_waifus_data::LevelEntityConfigData,
|
||||
template_config: &wicked_waifus_data::TemplateConfigData,
|
||||
element: Action) {
|
||||
match element {
|
||||
Action::SetBattleState(action) => unimplemented_action! { action },
|
||||
Action::ExecBattleAction(action) => unimplemented_action! { action },
|
||||
Action::WaitBattleCondition(action) => unimplemented_action! { action },
|
||||
Action::PlayFlow(action) => unimplemented_action! { action },
|
||||
Action::Collect(_) => collect_action(player, level_entity_data, template_config),
|
||||
Action::LeisureInteract(action) => unimplemented_action! { action },
|
||||
Action::UnlockTeleportTrigger(action) => unlock_teleport_trigger(player, action.params),
|
||||
Action::EnableTemporaryTeleport(action) => unimplemented_action! { action },
|
||||
Action::OpenSystemBoard(action) => unimplemented_action! { action },
|
||||
Action::OpenSystemFunction(action) => unimplemented_action! { action },
|
||||
Action::ChangeSelfEntityState(action) => change_self_entity_state(player, entity_id, level_entity_data, template_config, action.params),
|
||||
Action::SetPlayerOperationRestriction(action) => unimplemented_action! { action },
|
||||
Action::Wait(action) => unimplemented_action! { action },
|
||||
Action::ChangeEntityState(action) => unimplemented_action! { action },
|
||||
Action::Log(action) => unimplemented_action! { action },
|
||||
Action::EnableNearbyTracking(action) => unimplemented_action! { action },
|
||||
Action::TeleportDungeon(action) => unimplemented_action! { action },
|
||||
Action::DestroySelf(action) => unimplemented_action! { action },
|
||||
Action::CameraLookAt(action) => unimplemented_action! { action },
|
||||
Action::StopCameraLookAt(action) => unimplemented_action! { action },
|
||||
Action::EnterOrbitalCamera(action) => unimplemented_action! { action },
|
||||
Action::ExitOrbitalCamera(action) => unimplemented_action! { action },
|
||||
Action::SendAiEvent(action) => unimplemented_action! { action },
|
||||
Action::SetInteractionLockState(action) => unimplemented_action! { action },
|
||||
Action::AwakeEntity(action) => unimplemented_action! { action },
|
||||
Action::ChangeLiftTarget(action) => unimplemented_action! { action },
|
||||
Action::CalculateVar(action) => unimplemented_action! { action },
|
||||
Action::AddBuffToPlayer(action) => unimplemented_action! { action },
|
||||
Action::RemoveBuffFromPlayer(action) => unimplemented_action! { action },
|
||||
Action::AddBuffToEntity(action) => unimplemented_action! { action },
|
||||
Action::RemoveBuffFromEntity(action) => unimplemented_action! { action },
|
||||
Action::Prompt(action) => unimplemented_action! { action },
|
||||
Action::SetEntityVisible(action) => unimplemented_action! { action },
|
||||
Action::DestroyEntity(action) => unimplemented_action! { action },
|
||||
Action::GuideTrigger(action) => unimplemented_action! { action },
|
||||
Action::TriggerCameraShake(action) => unimplemented_action! { action },
|
||||
Action::SetVar(action) => unimplemented_action! { action },
|
||||
Action::VehicleEnter(action) => unimplemented_action! { action },
|
||||
Action::VehicleExitPlayer(action) => unimplemented_action! { action },
|
||||
Action::LockEntity(action) => unimplemented_action! { action },
|
||||
Action::UnlockEntity(action) => unimplemented_action! { action },
|
||||
Action::CommonTip(action) => unimplemented_action! { action },
|
||||
Action::CommonTip2(action) => unimplemented_action! { action },
|
||||
Action::PostAkEvent(action) => unimplemented_action! { action },
|
||||
Action::VehicleEnterNpc(action) => unimplemented_action! { action },
|
||||
Action::VehicleExitNpc(action) => unimplemented_action! { action },
|
||||
Action::PlayerLookAt(action) => unimplemented_action! { action },
|
||||
Action::PlayBubble(action) => unimplemented_action! { action },
|
||||
Action::AddPlayBubble(action) => unimplemented_action! { action },
|
||||
Action::ClearPlayBubble(action) => unimplemented_action! { action },
|
||||
Action::ExecRiskHarvestEffect(action) => unimplemented_action! { action },
|
||||
Action::EnableLevelPlay(action) => unimplemented_action! { action },
|
||||
Action::ClaimLevelPlayReward(action) => unimplemented_action! { action },
|
||||
Action::SettlementDungeon(action) => unimplemented_action! { action },
|
||||
Action::ExitDungeon(action) => unimplemented_action! { action },
|
||||
Action::FinishDungeon(action) => unimplemented_action! { action },
|
||||
Action::RecordDungeonEvent(action) => unimplemented_action! { action },
|
||||
Action::RecoverDurability(action) => unimplemented_action! { action },
|
||||
Action::FadeInScreen(action) => unimplemented_action! { action },
|
||||
Action::FadeOutScreen(action) => unimplemented_action! { action },
|
||||
Action::ChangeNpcPerformState(action) => unimplemented_action! { action },
|
||||
Action::EntityTurnTo(action) => unimplemented_action! { action },
|
||||
Action::EntityLookAt(action) => unimplemented_action! { action },
|
||||
Action::ToggleMapMarkState(action) => unimplemented_action! { action },
|
||||
Action::RandomVar(action) => unimplemented_action! { action },
|
||||
Action::ModifySceneItemAttributeTag(action) => unimplemented_action! { action },
|
||||
Action::VehicleWaterfallClimbing(action) => unimplemented_action! { action },
|
||||
Action::VehicleTeleport(action) => unimplemented_action! { action },
|
||||
Action::RogueGotoNextFloor(action) => unimplemented_action! { action },
|
||||
Action::RogueReceiveReward(action) => unimplemented_action! { action },
|
||||
Action::RogueSelectRoom(action) => unimplemented_action! { action },
|
||||
Action::RogueActivatePortal(action) => unimplemented_action! { action },
|
||||
Action::MowingTowerGotoNextFloor(action) => unimplemented_action! { action },
|
||||
Action::SlashAndTowerGotoNextFloor(action) => unimplemented_action! { action },
|
||||
Action::PlayMontage(action) => unimplemented_action! { action },
|
||||
Action::OpenSystemBoardWithReturn(action) => unimplemented_action! { action },
|
||||
Action::UnlockSystemItem(action) => unimplemented_action! { action },
|
||||
Action::SetSportsState(action) => unimplemented_action! { action },
|
||||
Action::OpenSimpleGameplay(action) => unimplemented_action! { action },
|
||||
Action::PlayEffect(action) => unimplemented_action! { action },
|
||||
Action::PlayEffect2(action) => unimplemented_action! { action },
|
||||
Action::RestorePlayerCameraAdjustment(action) => unimplemented_action! { action },
|
||||
Action::AdjustPlayerCamera(action) => unimplemented_action! { action },
|
||||
Action::SetPlayerPos(action) => unimplemented_action! { action },
|
||||
Action::MoveWithSpline(action) => unimplemented_action! { action },
|
||||
Action::EnableSplineMoveModel(action) => unimplemented_action! { action },
|
||||
Action::ToggleScanSplineEffect(action) => unimplemented_action! { action },
|
||||
Action::MoveSceneItem(action) => unimplemented_action! { action },
|
||||
Action::StopSceneItemMove(action) => unimplemented_action! { action },
|
||||
Action::FireBullet(action) => unimplemented_action! { action },
|
||||
Action::ClearFishingCabinInSaleItems(action) => unimplemented_action! { action },
|
||||
Action::AcceptFishingEntrust(action) => unimplemented_action! { action },
|
||||
Action::DestroyFishingBoat(action) => unimplemented_action! { action },
|
||||
Action::SetJigsawItem(action) => unimplemented_action! { action },
|
||||
Action::SetJigsawFoundation(action) => unimplemented_action! { action },
|
||||
Action::SetTeleControl(action) => unimplemented_action! { action },
|
||||
Action::SetEntityClientVisible(action) => unimplemented_action! { action },
|
||||
Action::ToggleHighlightExploreUi(action) => unimplemented_action! { action },
|
||||
Action::ExecAlertSystemAction(action) => unimplemented_action! { action },
|
||||
Action::AddFlowInteractOption(action) => unimplemented_action! { action },
|
||||
Action::RemoveFlowInteractOption(action) => unimplemented_action! { action },
|
||||
Action::EnableHostility(action) => unimplemented_action! { action },
|
||||
Action::ChangePhantomFormation(action) => unimplemented_action! { action },
|
||||
Action::RestorePhantomFormation(action) => unimplemented_action! { action },
|
||||
Action::ChangeTimer(action) => unimplemented_action! { action },
|
||||
Action::ToggleTimerPauseState(action) => unimplemented_action! { action },
|
||||
Action::ChangeFightTeam(action) => unimplemented_action! { action },
|
||||
Action::AddTrialFollowShooter(action) => unimplemented_action! { action },
|
||||
Action::RemoveTrialFollowShooter(action) => unimplemented_action! { action },
|
||||
Action::AddTrialCharacter(action) => unimplemented_action! { action },
|
||||
Action::RemoveTrialCharacter(action) => unimplemented_action! { action },
|
||||
Action::SetAreaState(action) => unimplemented_action! { action },
|
||||
Action::SwitchSubLevels(action) => unimplemented_action! { action },
|
||||
Action::ChangeTeamPosition(action) => unimplemented_action! { action },
|
||||
Action::GetItem(action) => unimplemented_action! { action },
|
||||
Action::CreatePrefab(action) => unimplemented_action! { action },
|
||||
Action::DestroyPrefab(action) => unimplemented_action! { action },
|
||||
Action::CompleteGuide(action) => unimplemented_action! { action },
|
||||
Action::PlayDynamicSettlement(action) => unimplemented_action! { action },
|
||||
Action::UsePhantomSkill(action) => unimplemented_action! { action },
|
||||
Action::HideTargetRange(action) => unimplemented_action! { action },
|
||||
Action::ChangeOtherState(action) => unimplemented_action! { action },
|
||||
Action::SetRegionConfig(action) => unimplemented_action! { action },
|
||||
Action::SetReviveRegion(action) => unimplemented_action! { action },
|
||||
Action::ExecResurrection(action) => unimplemented_action! { action },
|
||||
Action::ShowTargetRange(action) => unimplemented_action! { action },
|
||||
Action::SetTime(action) => unimplemented_action! { action },
|
||||
Action::SetTimeLockState(action) => unimplemented_action! { action },
|
||||
Action::EnableSystem(action) => unimplemented_action! { action },
|
||||
Action::EnableAoiNotify(action) => unimplemented_action! { action },
|
||||
Action::SetForceLock(action) => unimplemented_action! { action },
|
||||
Action::PlayRegisteredMontage(action) => unimplemented_action! { action },
|
||||
Action::SetAudioState(action) => unimplemented_action! { action },
|
||||
Action::HideGroup(action) => unimplemented_action! { action },
|
||||
Action::ShowHidedGroup(action) => unimplemented_action! { action },
|
||||
Action::HideSpecificEntities(action) => unimplemented_action! { action },
|
||||
Action::ShowSpecificEntities(action) => unimplemented_action! { action },
|
||||
Action::RemovePreloadResource(action) => unimplemented_action! { action },
|
||||
Action::Preload(action) => unimplemented_action! { action },
|
||||
Action::EnableAI(action) => unimplemented_action! { action },
|
||||
Action::SwitchDataLayers(action) => unimplemented_action! { action },
|
||||
Action::DestroyQuest(action) => unimplemented_action! { action },
|
||||
Action::DestroyQuestItem(action) => unimplemented_action! { action },
|
||||
Action::PromptQuestChapterUI(action) => unimplemented_action! { action },
|
||||
Action::TakePlotPhoto(action) => unimplemented_action! { action },
|
||||
Action::SetWuYinQuState(action) => unimplemented_action! { action },
|
||||
Action::RunActions(action) => unimplemented_action! { action },
|
||||
Action::ManualOccupations(action) => unimplemented_action! { action },
|
||||
Action::SetWeather(action) => unimplemented_action! { action },
|
||||
Action::SendNpcMail(action) => unimplemented_action! { action },
|
||||
Action::EnableFunction(action) => unimplemented_action! { action },
|
||||
Action::FocusOnMapMark(action) => unimplemented_action! { action },
|
||||
Action::CharacterLookAt(action) => unimplemented_action! { action },
|
||||
Action::AddGuestCharacter(action) => unimplemented_action! { action },
|
||||
Action::RemoveGuestCharacter(action) => unimplemented_action! { action },
|
||||
Action::TeleportToAndEnterVehicle(action) => unimplemented_action! { action },
|
||||
Action::SetAreaTimeState(action) => unimplemented_action! { action },
|
||||
Action::ResetPlayerCameraFocus(action) => unimplemented_action! { action },
|
||||
Action::ResetLevelPlay(action) => unimplemented_action! { action },
|
||||
Action::VehicleSprint(action) => unimplemented_action! { action },
|
||||
Action::VehicleMoveWithPathLine(action) => unimplemented_action! { action },
|
||||
Action::ClientPreEnableSubLevels(action) => unimplemented_action! { action },
|
||||
Action::GuestOperateUiAnimation(action) => unimplemented_action! { action },
|
||||
Action::ChangeEntityCamp(action) => unimplemented_action! { action },
|
||||
Action::NewMoveWithSpline(action) => unimplemented_action! { action },
|
||||
Action::DangoAbyssActivatePortal(action) => unimplemented_action! { action },
|
||||
Action::DangoAbyssCreateRewardTreasureBox(action) => unimplemented_action! { action },
|
||||
Action::DangoAbyssGotoNextFloor(action) => unimplemented_action! { action },
|
||||
Action::DangoAbyssReceiveReward(action) => unimplemented_action! { action },
|
||||
Action::SummonEntity(action) => unimplemented_action! { action },
|
||||
Action::GetRewardByInteract(action) => unimplemented_action! { action },
|
||||
Action::OpenQte(action) => unimplemented_action! { action },
|
||||
Action::ActiveAntiGravitySafePoint(action) => unimplemented_action! { action },
|
||||
Action::BvbPlayDialog(action) => unimplemented_action! { action },
|
||||
Action::BvbSendSystemEvent(action) => unimplemented_action! { action },
|
||||
Action::BvbSendAiEvent(action) => unimplemented_action! { action },
|
||||
Action::BvbPlayerOperationConstraint(action) => unimplemented_action! { action },
|
||||
Action::ExecClientBattleAction(action) => unimplemented_action! { action },
|
||||
Action::TriggerSpecificScanEffect(action) => unimplemented_action! { action },
|
||||
Action::SetActorVar(action) => unimplemented_action! { action },
|
||||
Action::RunActorCustomEvent(action) => unimplemented_action! { action },
|
||||
Action::StopUiScreenEffect(action) => unimplemented_action! { action },
|
||||
Action::StopNewMoveWithSpline(action) => unimplemented_action! { action },
|
||||
Action::RequestSystemFunction(action) => unimplemented_action! { action },
|
||||
}
|
||||
}
|
||||
// pub fn perform_action(player: &mut Player,
|
||||
// entity_id: i64,
|
||||
// level_entity_data: &wicked_waifus_data::LevelEntityConfigData,
|
||||
// template_config: &wicked_waifus_data::TemplateConfigData,
|
||||
// element: Action) {
|
||||
// match element {
|
||||
// Action::SetBattleState(action) => unimplemented_action! { action },
|
||||
// Action::ExecBattleAction(action) => unimplemented_action! { action },
|
||||
// Action::WaitBattleCondition(action) => unimplemented_action! { action },
|
||||
// Action::PlayFlow(action) => unimplemented_action! { action },
|
||||
// Action::Collect(_) => collect_action(player, level_entity_data, template_config),
|
||||
// Action::LeisureInteract(action) => unimplemented_action! { action },
|
||||
// Action::UnlockTeleportTrigger(action) => unlock_teleport_trigger(player, action.params),
|
||||
// Action::EnableTemporaryTeleport(action) => unimplemented_action! { action },
|
||||
// Action::OpenSystemBoard(action) => unimplemented_action! { action },
|
||||
// Action::OpenSystemFunction(action) => unimplemented_action! { action },
|
||||
// Action::ChangeSelfEntityState(action) => change_self_entity_state(player, entity_id, level_entity_data, template_config, action.params),
|
||||
// Action::SetPlayerOperationRestriction(action) => unimplemented_action! { action },
|
||||
// Action::Wait(action) => unimplemented_action! { action },
|
||||
// Action::ChangeEntityState(action) => unimplemented_action! { action },
|
||||
// Action::Log(action) => unimplemented_action! { action },
|
||||
// Action::EnableNearbyTracking(action) => unimplemented_action! { action },
|
||||
// Action::TeleportDungeon(action) => unimplemented_action! { action },
|
||||
// Action::DestroySelf(action) => unimplemented_action! { action },
|
||||
// Action::CameraLookAt(action) => unimplemented_action! { action },
|
||||
// Action::StopCameraLookAt(action) => unimplemented_action! { action },
|
||||
// Action::EnterOrbitalCamera(action) => unimplemented_action! { action },
|
||||
// Action::ExitOrbitalCamera(action) => unimplemented_action! { action },
|
||||
// Action::SendAiEvent(action) => unimplemented_action! { action },
|
||||
// Action::SetInteractionLockState(action) => unimplemented_action! { action },
|
||||
// Action::AwakeEntity(action) => unimplemented_action! { action },
|
||||
// Action::ChangeLiftTarget(action) => unimplemented_action! { action },
|
||||
// Action::CalculateVar(action) => unimplemented_action! { action },
|
||||
// Action::AddBuffToPlayer(action) => unimplemented_action! { action },
|
||||
// Action::RemoveBuffFromPlayer(action) => unimplemented_action! { action },
|
||||
// Action::AddBuffToEntity(action) => unimplemented_action! { action },
|
||||
// Action::RemoveBuffFromEntity(action) => unimplemented_action! { action },
|
||||
// Action::Prompt(action) => unimplemented_action! { action },
|
||||
// Action::SetEntityVisible(action) => unimplemented_action! { action },
|
||||
// Action::DestroyEntity(action) => unimplemented_action! { action },
|
||||
// Action::GuideTrigger(action) => unimplemented_action! { action },
|
||||
// Action::TriggerCameraShake(action) => unimplemented_action! { action },
|
||||
// Action::SetVar(action) => unimplemented_action! { action },
|
||||
// Action::VehicleEnter(action) => unimplemented_action! { action },
|
||||
// Action::VehicleExitPlayer(action) => unimplemented_action! { action },
|
||||
// Action::LockEntity(action) => unimplemented_action! { action },
|
||||
// Action::UnlockEntity(action) => unimplemented_action! { action },
|
||||
// Action::CommonTip(action) => unimplemented_action! { action },
|
||||
// Action::CommonTip2(action) => unimplemented_action! { action },
|
||||
// Action::PostAkEvent(action) => unimplemented_action! { action },
|
||||
// Action::VehicleEnterNpc(action) => unimplemented_action! { action },
|
||||
// Action::VehicleExitNpc(action) => unimplemented_action! { action },
|
||||
// Action::PlayerLookAt(action) => unimplemented_action! { action },
|
||||
// Action::PlayBubble(action) => unimplemented_action! { action },
|
||||
// Action::AddPlayBubble(action) => unimplemented_action! { action },
|
||||
// Action::ClearPlayBubble(action) => unimplemented_action! { action },
|
||||
// Action::ExecRiskHarvestEffect(action) => unimplemented_action! { action },
|
||||
// Action::EnableLevelPlay(action) => unimplemented_action! { action },
|
||||
// Action::ClaimLevelPlayReward(action) => unimplemented_action! { action },
|
||||
// Action::SettlementDungeon(action) => unimplemented_action! { action },
|
||||
// Action::ExitDungeon(action) => unimplemented_action! { action },
|
||||
// Action::FinishDungeon(action) => unimplemented_action! { action },
|
||||
// Action::RecordDungeonEvent(action) => unimplemented_action! { action },
|
||||
// Action::RecoverDurability(action) => unimplemented_action! { action },
|
||||
// Action::FadeInScreen(action) => unimplemented_action! { action },
|
||||
// Action::FadeOutScreen(action) => unimplemented_action! { action },
|
||||
// Action::ChangeNpcPerformState(action) => unimplemented_action! { action },
|
||||
// Action::EntityTurnTo(action) => unimplemented_action! { action },
|
||||
// Action::EntityLookAt(action) => unimplemented_action! { action },
|
||||
// Action::ToggleMapMarkState(action) => unimplemented_action! { action },
|
||||
// Action::RandomVar(action) => unimplemented_action! { action },
|
||||
// Action::ModifySceneItemAttributeTag(action) => unimplemented_action! { action },
|
||||
// Action::VehicleWaterfallClimbing(action) => unimplemented_action! { action },
|
||||
// Action::VehicleTeleport(action) => unimplemented_action! { action },
|
||||
// Action::RogueGotoNextFloor(action) => unimplemented_action! { action },
|
||||
// Action::RogueReceiveReward(action) => unimplemented_action! { action },
|
||||
// Action::RogueSelectRoom(action) => unimplemented_action! { action },
|
||||
// Action::RogueActivatePortal(action) => unimplemented_action! { action },
|
||||
// Action::MowingTowerGotoNextFloor(action) => unimplemented_action! { action },
|
||||
// Action::SlashAndTowerGotoNextFloor(action) => unimplemented_action! { action },
|
||||
// Action::PlayMontage(action) => unimplemented_action! { action },
|
||||
// Action::OpenSystemBoardWithReturn(action) => unimplemented_action! { action },
|
||||
// Action::UnlockSystemItem(action) => unimplemented_action! { action },
|
||||
// Action::SetSportsState(action) => unimplemented_action! { action },
|
||||
// Action::OpenSimpleGameplay(action) => unimplemented_action! { action },
|
||||
// Action::PlayEffect(action) => unimplemented_action! { action },
|
||||
// Action::PlayEffect2(action) => unimplemented_action! { action },
|
||||
// Action::RestorePlayerCameraAdjustment(action) => unimplemented_action! { action },
|
||||
// Action::AdjustPlayerCamera(action) => unimplemented_action! { action },
|
||||
// Action::SetPlayerPos(action) => unimplemented_action! { action },
|
||||
// Action::MoveWithSpline(action) => unimplemented_action! { action },
|
||||
// Action::EnableSplineMoveModel(action) => unimplemented_action! { action },
|
||||
// Action::ToggleScanSplineEffect(action) => unimplemented_action! { action },
|
||||
// Action::MoveSceneItem(action) => unimplemented_action! { action },
|
||||
// Action::StopSceneItemMove(action) => unimplemented_action! { action },
|
||||
// Action::FireBullet(action) => unimplemented_action! { action },
|
||||
// Action::ClearFishingCabinInSaleItems(action) => unimplemented_action! { action },
|
||||
// Action::AcceptFishingEntrust(action) => unimplemented_action! { action },
|
||||
// Action::DestroyFishingBoat(action) => unimplemented_action! { action },
|
||||
// Action::SetJigsawItem(action) => unimplemented_action! { action },
|
||||
// Action::SetJigsawFoundation(action) => unimplemented_action! { action },
|
||||
// Action::SetTeleControl(action) => unimplemented_action! { action },
|
||||
// Action::SetEntityClientVisible(action) => unimplemented_action! { action },
|
||||
// Action::ToggleHighlightExploreUi(action) => unimplemented_action! { action },
|
||||
// Action::ExecAlertSystemAction(action) => unimplemented_action! { action },
|
||||
// Action::AddFlowInteractOption(action) => unimplemented_action! { action },
|
||||
// Action::RemoveFlowInteractOption(action) => unimplemented_action! { action },
|
||||
// Action::EnableHostility(action) => unimplemented_action! { action },
|
||||
// Action::ChangePhantomFormation(action) => unimplemented_action! { action },
|
||||
// Action::RestorePhantomFormation(action) => unimplemented_action! { action },
|
||||
// Action::ChangeTimer(action) => unimplemented_action! { action },
|
||||
// Action::ToggleTimerPauseState(action) => unimplemented_action! { action },
|
||||
// Action::ChangeFightTeam(action) => unimplemented_action! { action },
|
||||
// Action::AddTrialFollowShooter(action) => unimplemented_action! { action },
|
||||
// Action::RemoveTrialFollowShooter(action) => unimplemented_action! { action },
|
||||
// Action::AddTrialCharacter(action) => unimplemented_action! { action },
|
||||
// Action::RemoveTrialCharacter(action) => unimplemented_action! { action },
|
||||
// Action::SetAreaState(action) => unimplemented_action! { action },
|
||||
// Action::SwitchSubLevels(action) => unimplemented_action! { action },
|
||||
// Action::ChangeTeamPosition(action) => unimplemented_action! { action },
|
||||
// Action::GetItem(action) => unimplemented_action! { action },
|
||||
// Action::CreatePrefab(action) => unimplemented_action! { action },
|
||||
// Action::DestroyPrefab(action) => unimplemented_action! { action },
|
||||
// Action::CompleteGuide(action) => unimplemented_action! { action },
|
||||
// Action::PlayDynamicSettlement(action) => unimplemented_action! { action },
|
||||
// Action::UsePhantomSkill(action) => unimplemented_action! { action },
|
||||
// Action::HideTargetRange(action) => unimplemented_action! { action },
|
||||
// Action::ChangeOtherState(action) => unimplemented_action! { action },
|
||||
// Action::SetRegionConfig(action) => unimplemented_action! { action },
|
||||
// Action::SetReviveRegion(action) => unimplemented_action! { action },
|
||||
// Action::ExecResurrection(action) => unimplemented_action! { action },
|
||||
// Action::ShowTargetRange(action) => unimplemented_action! { action },
|
||||
// Action::SetTime(action) => unimplemented_action! { action },
|
||||
// Action::SetTimeLockState(action) => unimplemented_action! { action },
|
||||
// Action::EnableSystem(action) => unimplemented_action! { action },
|
||||
// Action::EnableAoiNotify(action) => unimplemented_action! { action },
|
||||
// Action::SetForceLock(action) => unimplemented_action! { action },
|
||||
// Action::PlayRegisteredMontage(action) => unimplemented_action! { action },
|
||||
// Action::SetAudioState(action) => unimplemented_action! { action },
|
||||
// Action::HideGroup(action) => unimplemented_action! { action },
|
||||
// Action::ShowHidedGroup(action) => unimplemented_action! { action },
|
||||
// Action::HideSpecificEntities(action) => unimplemented_action! { action },
|
||||
// Action::ShowSpecificEntities(action) => unimplemented_action! { action },
|
||||
// Action::RemovePreloadResource(action) => unimplemented_action! { action },
|
||||
// Action::Preload(action) => unimplemented_action! { action },
|
||||
// Action::EnableAI(action) => unimplemented_action! { action },
|
||||
// Action::SwitchDataLayers(action) => unimplemented_action! { action },
|
||||
// Action::DestroyQuest(action) => unimplemented_action! { action },
|
||||
// Action::DestroyQuestItem(action) => unimplemented_action! { action },
|
||||
// Action::PromptQuestChapterUI(action) => unimplemented_action! { action },
|
||||
// Action::TakePlotPhoto(action) => unimplemented_action! { action },
|
||||
// Action::SetWuYinQuState(action) => unimplemented_action! { action },
|
||||
// Action::RunActions(action) => unimplemented_action! { action },
|
||||
// Action::ManualOccupations(action) => unimplemented_action! { action },
|
||||
// Action::SetWeather(action) => unimplemented_action! { action },
|
||||
// Action::SendNpcMail(action) => unimplemented_action! { action },
|
||||
// Action::EnableFunction(action) => unimplemented_action! { action },
|
||||
// Action::FocusOnMapMark(action) => unimplemented_action! { action },
|
||||
// Action::CharacterLookAt(action) => unimplemented_action! { action },
|
||||
// Action::AddGuestCharacter(action) => unimplemented_action! { action },
|
||||
// Action::RemoveGuestCharacter(action) => unimplemented_action! { action },
|
||||
// Action::TeleportToAndEnterVehicle(action) => unimplemented_action! { action },
|
||||
// Action::SetAreaTimeState(action) => unimplemented_action! { action },
|
||||
// Action::ResetPlayerCameraFocus(action) => unimplemented_action! { action },
|
||||
// Action::ResetLevelPlay(action) => unimplemented_action! { action },
|
||||
// Action::VehicleSprint(action) => unimplemented_action! { action },
|
||||
// Action::VehicleMoveWithPathLine(action) => unimplemented_action! { action },
|
||||
// Action::ClientPreEnableSubLevels(action) => unimplemented_action! { action },
|
||||
// Action::GuestOperateUiAnimation(action) => unimplemented_action! { action },
|
||||
// Action::ChangeEntityCamp(action) => unimplemented_action! { action },
|
||||
// Action::NewMoveWithSpline(action) => unimplemented_action! { action },
|
||||
// Action::DangoAbyssActivatePortal(action) => unimplemented_action! { action },
|
||||
// Action::DangoAbyssCreateRewardTreasureBox(action) => unimplemented_action! { action },
|
||||
// Action::DangoAbyssGotoNextFloor(action) => unimplemented_action! { action },
|
||||
// Action::DangoAbyssReceiveReward(action) => unimplemented_action! { action },
|
||||
// Action::SummonEntity(action) => unimplemented_action! { action },
|
||||
// Action::GetRewardByInteract(action) => unimplemented_action! { action },
|
||||
// Action::OpenQte(action) => unimplemented_action! { action },
|
||||
// Action::ActiveAntiGravitySafePoint(action) => unimplemented_action! { action },
|
||||
// Action::BvbPlayDialog(action) => unimplemented_action! { action },
|
||||
// Action::BvbSendSystemEvent(action) => unimplemented_action! { action },
|
||||
// Action::BvbSendAiEvent(action) => unimplemented_action! { action },
|
||||
// Action::BvbPlayerOperationConstraint(action) => unimplemented_action! { action },
|
||||
// Action::ExecClientBattleAction(action) => unimplemented_action! { action },
|
||||
// Action::TriggerSpecificScanEffect(action) => unimplemented_action! { action },
|
||||
// Action::SetActorVar(action) => unimplemented_action! { action },
|
||||
// Action::RunActorCustomEvent(action) => unimplemented_action! { action },
|
||||
// Action::StopUiScreenEffect(action) => unimplemented_action! { action },
|
||||
// Action::StopNewMoveWithSpline(action) => unimplemented_action! { action },
|
||||
// Action::RequestSystemFunction(action) => unimplemented_action! { action },
|
||||
// }
|
||||
// }
|
||||
|
||||
fn collect_action(player: &mut Player,
|
||||
level_entity_data: &wicked_waifus_data::LevelEntityConfigData,
|
||||
template_config: &wicked_waifus_data::TemplateConfigData) {
|
||||
if let Some(reward_component) = level_entity_data.components_data.reward_component
|
||||
.as_ref()
|
||||
.or(template_config.components_data.reward_component.as_ref()) {
|
||||
if reward_component.disabled.unwrap_or(false) {
|
||||
return;
|
||||
}
|
||||
// TODO: check the use of reward_type and drop_on_event
|
||||
// Seems type 0 is reward from preview, while 1 and 2 is unknown
|
||||
if let Some(reward_id) = reward_component.reward_id {
|
||||
let drop = wicked_waifus_data::drop_package_data::get(&reward_id).unwrap();
|
||||
let usages = drop.drop_preview.iter()
|
||||
.map(|(&id, &quantity)| ItemUsage { id, quantity })
|
||||
.collect::<Vec<_>>();
|
||||
let updated_items = player.inventory.add_items(&usages);
|
||||
let normal_item_list = player.inventory.to_normal_item_list_filtered(
|
||||
updated_items.keys().cloned().collect::<Vec<i32>>()
|
||||
);
|
||||
player.notify(NormalItemUpdateNotify { normal_item_list, no_tips: false });
|
||||
// UpdateHandBookActiveStateMapNotify
|
||||
let mut rewards: HashMap<i32, WR> = HashMap::new();
|
||||
rewards.insert(0, WR {
|
||||
item_list: drop.drop_preview.iter()
|
||||
.map(|(&id, &quantity)| RewardItemInfo {
|
||||
show_plan_id: 0, // TODO: Check how to get this
|
||||
item_id: id,
|
||||
count: quantity,
|
||||
incr_id: 0,
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
});
|
||||
player.notify(ItemRewardNotify {
|
||||
drop_id: reward_id,
|
||||
reason: 15000,
|
||||
magnification: 1,
|
||||
reward_items: rewards,
|
||||
});
|
||||
}
|
||||
// TODO: Should we remove entity?? get pcap
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn unlock_teleport_trigger(player: &mut Player, action: UnlockTeleportTrigger) {
|
||||
player.unlock_teleport(action.teleport_id)
|
||||
}
|
||||
|
||||
fn change_self_entity_state(player: &mut Player,
|
||||
fn change_self_entity_state_action(player: &mut Player,
|
||||
entity_id: i64,
|
||||
level_entity_data: &wicked_waifus_data::LevelEntityConfigData,
|
||||
template_config: &wicked_waifus_data::TemplateConfigData,
|
||||
|
|
Loading…
Reference in a new issue