From ccd8fa64936923178330d8b2451a8537282f9dae Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sun, 28 Apr 2019 16:23:49 +0800 Subject: [PATCH] 1 --- server/gameserver/human.cc | 10 ++++++++-- server/gameserver/human.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 27bd9d7..50c727f 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -9,6 +9,7 @@ #include "loot.h" #include "collision.h" #include "building.h" +#include "hero.h" Human::Human():Entity() { @@ -608,7 +609,7 @@ void Human::DoSkill() break; case ST_SummonHero: { - + SummonHero(); } break; case ST_Accelerate: @@ -1074,7 +1075,7 @@ void Human::FillBodyState(::google::protobuf::RepeatedPtrField<::cs::MFBodyState int passed_time = (room->frame_no - hide_frameno_) * FRAME_RATE_MS; cs::MFBodyState* state = states->Add(); state->set_state_type(HS_Hide); - state->set_left_time(std::max(0, skill_meta->i->cd_time() * 1000 - passed_time)); + state->set_left_time(std::max(0, skill_meta->i->last_time() * 1000 - passed_time)); state->set_lasting_time(skill_meta->i->last_time() * 1000); } if (a8::HasBitFlag(status, HS_Accelerate) && skill_meta) { @@ -1113,3 +1114,8 @@ void Human::FillBodyState(::google::protobuf::RepeatedPtrField<::cs::MFBodyState state->set_lasting_time(skill_meta->i->last_time() * 1000); } } + +void Human::SummonHero() +{ + +} diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 8ecb8ff..37e175f 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -150,6 +150,7 @@ class Human : public Entity int GetVolume(int slot_id); void RecoverHp(int inc_hp); void FillBodyState(::google::protobuf::RepeatedPtrField<::cs::MFBodyState>* states); + void SummonHero(); protected: long long last_shot_frameno_ = 0;