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.
* Replace max bg type checks by DBC valid index check
* Use in functions and fields BattlegroundTypeId type instead uint32
* Fixed wrong use bg queue ids instead bg type ids in queue update/remove function calls.
Many bg have same raw values for type id and queue id but some can be affected by this bug:
BATTLEGROUND_EY, BATTLEGROUND_SA, and all areans (with small arena/team size exceptions)
* Move Battlemaster to bg type ids map fron ObjectMgr to BatteleGroundMgr.
* Remobe redundent for header itself includes for BG headers.
* Use Auction location enum instead raw valus.
* Fixed creature/gameobject save from game (used in commands code only)
* Implement .modify phase (for player), .npc setphase (for creature/pet), .gobject phase (for gameobjects) commands
for set phasemask of selected object. In player/pet case temporary until in game phase switch/re-login/GM-mode change.
In creature/gameobject case change saved in DB.
* Add to .gps output phasemask value print. Allow use .gps command with creature/gameobject shift-link
(work for objects loaded in game in command time).
* Store phase mask for creatures/gameobjects/corpse in DB
* Propertly set phase for summoned creatures/gameobjects/pets/corpses/spell related dynobjects
* Select proper phase for spawned creature/gameobjects and save it in DB
TODO: in game commands.
* Use WorldObject phase mask field instead explicit aura scan. This allow have phase for any world objects.
* Add phase checks to packet broadcasters/object searchers. This let correctly work say/yell/area
and multi/random target spells/aggro assistance in phased areas or target selection.
* In GM-mode character presense (see and visible) in all phases except normal visibility efects including GM-visibility.
TODO: summoned objects phase set base at owner phase, load phase mask for creatures/gameobjects from DB, in game commands.
Correct totem immunes for dot/leech/Fear/Transform auras (immune only to effect)
Correct log if all effects immuned by Effect Immune
Move check for IMMUNITY_STATE to Unit::IsImmunedToSpellEffect
Signed-off-by: DiSlord <dislord@nomail.com>
More correct spell select for creatures if spell PreventionType == SPELL_PREVENTION_TYPE_SILENCE
Also add check for PreventionType == SPELL_PREVENTION_TYPE_PACIFY
Signed-off-by: DiSlord <dislord@nomail.com>
i used this script
for i in ls *.[ch]*; do cat $i | sed -r 's/(.*for.*iterator.*;\
*)([a-z0-9\_\*]+)\ *\+\+(.*)/\1++\2\3/' > /tmp/mangos/$i; done
for i in ls *.[ch]*; do cp /tmp/mangos/$i $i; done
and rechecked it with my eyes, if everything is right
i took only for-loops cause they can be gathered easier with a script
Signed-off-by: hunuza <hunuza@gmail.com>
* loaded all distinct script names into one vector at server startup
* added custom loaders to convert the script names to indices
* converted all the script lookup functions to use the index instead of the name
Removed unnecessary database queries in some command handlers.
Replaced them with access to cached data or queries for only the needed data.
Move database access in gossip select code to less often called place.
Removed unnecessary database queries in some command handlers.
Replaced them with access to cached data or queries for only the needed data.
Move database access in gossip select code to less often called place.
* Rename 2 creature_template fields to more clean names and related code update also.
* Use enum values instead raw values for type_flags, use halper functions instead code repeating.
* Move tamed pet creating code to new function.