merge dev
This commit is contained in:
commit
5d1d4a986a
@ -1471,3 +1471,10 @@ void Creature::SetCurrWeapon(Weapon* weapon)
|
||||
#endif
|
||||
curr_weapon_ = weapon;
|
||||
}
|
||||
|
||||
void Creature::ResetAllSkillCd()
|
||||
{
|
||||
for (auto& pair : skill_hash_) {
|
||||
pair.second->ResetSkillCd();
|
||||
}
|
||||
}
|
||||
|
@ -139,6 +139,7 @@ class Creature : public MoveableEntity
|
||||
Weapon* ChooseNextWeapon(int curr_weapon_slot_id, int begin_slot_id, int end_slot_id);
|
||||
Weapon* GetCurrWeapon() { return curr_weapon_; };
|
||||
void SetCurrWeapon(Weapon* weapon);
|
||||
void ResetAllSkillCd();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -248,6 +248,7 @@ void Human::FillMFPlayerStats(cs::MFPlayerStats* stats_pb)
|
||||
stats_pb->set_player_avatar_url(avatar_url);
|
||||
stats_pb->set_charid(meta->i->id());
|
||||
stats_pb->set_team_id(team_id);
|
||||
stats_pb->set_nickname(name);
|
||||
|
||||
if (!dead) {
|
||||
stats_pb->set_time_alive(room->GetFrameNo() * 1000.0f / SERVER_FRAME_RATE);
|
||||
|
@ -1706,6 +1706,7 @@ void Room::ShuaPlane()
|
||||
|
||||
for (auto& pair : human_hash_) {
|
||||
pair.second->MustBeAddBuff(pair.second, FLY_BUFFID);
|
||||
pair.second->ResetAllSkillCd();
|
||||
pair.second->SetPos(plane.curr_pos);
|
||||
pair.second->attack_dir = plane.dir;
|
||||
pair.second->SetMoveDir(plane.dir);
|
||||
|
@ -132,3 +132,11 @@ void Skill::NotifySkillState()
|
||||
owner->room->frame_event.AddSkillCurrTimesChg(owner->AllocWeakPtr(), meta->i->skill_id(), GetCurrTimes());
|
||||
}
|
||||
}
|
||||
|
||||
void Skill::ResetSkillCd()
|
||||
{
|
||||
curr_times_ = 0;
|
||||
if (inc_times_timer_) {
|
||||
owner->room->xtimer.ModifyTimer(inc_times_timer_, GetCd() / FRAME_RATE_MS);
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ class Skill
|
||||
int GetMaxTimes();
|
||||
void DecTimes();
|
||||
void FillMFSkill(cs::MFSkill* skill_pb);
|
||||
void ResetSkillCd();
|
||||
|
||||
void ClearPassiveSkillBuff();
|
||||
void AddPassiveSkillBuff();
|
||||
|
@ -669,6 +669,7 @@ message MFPlayerStats
|
||||
optional int32 sex = 37 [default = 0]; //性别
|
||||
optional int32 charid = 38; //人物id
|
||||
optional int32 team_id = 39; //tamid
|
||||
optional string nickname = 43; //昵称
|
||||
}
|
||||
|
||||
//空投
|
||||
|
Loading…
x
Reference in New Issue
Block a user