移除上帝模式buff
This commit is contained in:
parent
616d1cbab1
commit
2affb61573
@ -883,9 +883,7 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
|
|||||||
if (HasBuffEffect(kBET_Camouflage)) {
|
if (HasBuffEffect(kBET_Camouflage)) {
|
||||||
RemoveBuffByEffectId(kBET_Camouflage);
|
RemoveBuffByEffectId(kBET_Camouflage);
|
||||||
}
|
}
|
||||||
if (GetBuffByEffectId(kBET_LordMode)) {
|
ClearLordMode();
|
||||||
RemoveBuffByEffectId(kBET_LordMode);
|
|
||||||
}
|
|
||||||
int max_revive_times = MetaMgr::Instance()->GetSysParamAsInt("max_revive_times", 1);
|
int max_revive_times = MetaMgr::Instance()->GetSysParamAsInt("max_revive_times", 1);
|
||||||
if (weapon_id != VW_Spectate &&
|
if (weapon_id != VW_Spectate &&
|
||||||
dead_times <= max_revive_times &&
|
dead_times <= max_revive_times &&
|
||||||
@ -3146,3 +3144,17 @@ void Human::CancelRevive()
|
|||||||
FreeReviveTimer();
|
FreeReviveTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Human::ClearLordMode()
|
||||||
|
{
|
||||||
|
Buff* buff = GetBuffByEffectId(kBET_LordMode);
|
||||||
|
if (buff) {
|
||||||
|
std::vector<std::string> strings;
|
||||||
|
a8::Split(buff->meta->i->buff_param1(), strings, ':');
|
||||||
|
for (auto& str : strings) {
|
||||||
|
int buff_id = a8::XValue(str);
|
||||||
|
RemoveBuffById(buff_id);
|
||||||
|
}
|
||||||
|
RemoveBuffByEffectId(kBET_LordMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -270,6 +270,7 @@ private:
|
|||||||
void SendBattleReport();
|
void SendBattleReport();
|
||||||
void FindLocationWithTarget(Entity* target);
|
void FindLocationWithTarget(Entity* target);
|
||||||
void Revive();
|
void Revive();
|
||||||
|
void ClearLordMode();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
long long last_shot_frameno_ = 0;
|
long long last_shot_frameno_ = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user