mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7391] Prevent achievement counter overflow, implement ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE generic support.
Before overflow has been possible at 4294967295 lols for example. ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE in many cases require check special conditions and targets. For this allow call it from scripts: * Add Player::UpdateAchievementCriteria functiona ccessable from scripts * In emote case it allowed call in form player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, text_emote_id, achievement_id, target_unit_ptr);
This commit is contained in:
parent
83affb51fd
commit
5a8f379a70
6 changed files with 75 additions and 40 deletions
|
|
@ -19869,3 +19869,8 @@ void Player::HandleFall(MovementInfo const& movementInfo)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Player::UpdateAchievementCriteria( AchievementCriteriaTypes type, uint32 miscvalue1/*=0*/, uint32 miscvalue2/*=0*/, Unit *unit/*=NULL*/, uint32 time/*=0*/ )
|
||||
{
|
||||
GetAchievementMgr().UpdateAchievementCriteria(type, miscvalue1,miscvalue2,unit,time);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue