* Implement support achievements with refAchievement field != 0, that have criterias stored in achievement refAchievement.
* Implement support achievement complete req. with specific count of completed critirias.
* Avoid full achievement list scan at search achievement associated with criteria.
* Send SMSG_CRITERIA_UPDATE to player itself only. This will fix bug when, for example near player death
owerwrite another player death count in statistics until next death or relogin.
* Send to near player CHAT_MSG_ACHIEVEMENT instead CHAT_MSG_GUILD_ACHIEVEMENT
* Not send CHAT_MSG_GUILD_ACHIEVEMENT to player itself.
* Limit around broadcast of SMSG_ACHIEVEMENT_EARNED to CONFIG_LISTEN_RANGE_SAY (same as for CHAT_MSG_ACHIEVEMENT)
Only if chnage can affect result
* ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL
* ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS
* ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION
* ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION if
Also optimize strcture LootStoreItem that let use 4 byte for loot template element in memory instead 5 bytes.
But limit group id to 127 max value. Check this at loading.
* src/game/GameEvent.* renamed to src/game/GameEventMgr.* for consistence
* `game_event` now have new `holiday` field for store client side holiday id associated with game event
* Added new enum HolidayIds with existed at this moment holiday ids.
* New function "bool IsHolidayActive(HolidayIds id)" added accessabel from scripts for active holidays check.
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);
* ACHIEVEMENT_CRITERIA_TYPE_DEATH (normal and arena types counting)
* ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON (instance types by man limit counting)
Note: need fixed for cases when max allowed players different from recommended count.
* ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM (environment damage sources by types)
Fixed:
* ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_PLAYER
- self-kill counting as death from players
- same team player kill in opposition kills counter.
Also cleanup in Player::EnvironmentalDamage use DBCStructure.h comment.
Added 2 new config options - InvitationType and PremadeGroupWaitForMatch - you can find more info in default config file.
This patch can cause crashes.
Signed-off-by: Triply <triply@getmangos.com>
1) comparison singed and unsigned values
2) redundent includes
3) wrong constructor :-part field initilization
4) unused not-/*name*/-guarded args in template/virtual functions that not required like args.
5) explicitly list not implemented achievement types.
Also bugs fixed:
1) Drop wrong phase mask 0 check in WorldObject::InSamePhase.
2) ArenaTeamMember::ModifyPersonalRating incorrect work with move points in negative with infinity values in result.
3) ArenaTeam::SaveToDB code send uint64 value to string with arg format %u.