From 991831f46ebd6df786bc6a7d02c4a3b4581aece4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 26 Sep 2022 14:13:44 +0800 Subject: [PATCH] 1 --- server/gameserver/creature.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index 9508f07b..412c0db2 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -1213,7 +1213,7 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase) target_distance = skill_distance_; room->xtimer.AddDeadLineTimerAndAttach ( - (target_distance / weapon_meta->i->bullet_speed()) * 1000.0f / FRAME_RATE_MS, + (target_distance / weapon_meta->i->bullet_speed() + 0.3) * 1000.0f / FRAME_RATE_MS, a8::XParams() .SetSender(this) .SetParam1(context_pos.x) @@ -1226,10 +1226,10 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase) a8::Vec2 context_pos; context_pos.x = param.param1.GetDouble(); - context_pos.x = param.param2.GetDouble(); + context_pos.y = param.param2.GetDouble(); a8::Vec2 old_context_pos = c->context_pos; - c->TryAddBuff(c, equip_meta->int_param1); c->context_pos = context_pos; + c->TryAddBuff(c, equip_meta->int_param1); c->context_pos = old_context_pos; }, &xtimer_attacher.timer_list_, @@ -2339,7 +2339,14 @@ void Creature::SummonObstacle(Buff* buff, int id, const a8::Vec2& target_pos) obstacle->context_ability = context_ability; slave_things_.push_back(std::make_tuple(buff->meta->i->buff_id(), obstacle)); #ifdef DEBUG - SendDebugMsg(a8::Format("召唤物件 buff_id:%d thing_id:%d", {buff->meta->i->buff_id(), id})); + SendDebugMsg(a8::Format("召唤物件 buff_id:%d thing_id:%d pos:%f,%f target_pos:%f,%f", + {buff->meta->i->buff_id(), + id, + GetPos().x, + GetPos().y, + pos.x, + pos.y + })); #endif } else { #ifdef DEBUG