all warnings from Wunused
and some from Wall
cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code
for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint
also note for coding:
if you do something like
if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)
Signed-off-by: balrok <der-coole-carl@gmx.net>
Rename m_TeamScores500disadvantage to m_TeamScores500Disadvantage, and optimize its update.
Patch is tested.
Signed-off-by: Triply <triply@getmangos.com>
Removed in sql update spell not expected to be listed in character_spell
long before [8416] as dependent, but reported as partly listed. So do cleanup.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Make from TARGET_EFFECT_SELECT code normal Spell::SetTargetMap case
* In additional for old 0/TARGET_EFFECT_SELECT pairs call it in case coordinate targets.
(cherry picked from commit 7efab7fd38c3a753e967648ca8ef1f2cdfbac76c)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
With some fixes and rewrites.
* Report at loading about deprecated ITEM_MOD_SPELL_HEALING_DONE and ITEM_MOD_SPELL_DAMAGE_DONE
and drop support code.
* Merge healing/damage base spell bonus fields and function to spell power field/function.
This fix problem with temporary "alive" cases for prist talent for example.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Use final damage for check
* Also fix CMSG_REPOP_REQUEST read warning spam.
The SRP-6 specifications clearly say, that v and s are only to be
calculated on registering a user and changing his password; calculating
them on every login is plain waste.
Creature with this flag will no longer be attackable by other creatures, and if by any reason it enter combat, flag is removed.
Signed-off-by: NoFantasy <nofantasy@nf.no>
* git_id updated to generate revision_sql.h file with required_* fields strings.
* mangosd/realmd changed to include header and check this strings at startup.
* mangosd/realmd will terminated if related strings not match in DB content.
In most cases this meaning that not all expected sql updates applied.
Current required_* field stored in DB output in error to help find what last sql updates applied.
IMPORTNAT NOTE for mangos devs: please update used git_id before adding next commits with sql updates!
* Base at TOM_RUS reseach save/load character specific account data in new table `character_account_data`
* Move its in sql update from `account_data` to new table.
* For client packets that can be send in loggined state or just after logout but assocualted
with recently logout character add new login status STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT
* Store low guid for loggedin player or recently logout into WorldSession.
This is solve problems with talents/glyphs/etc that affect of some talent/passive ability bonus in case:
affected talent/ability spell aura already applied before spellmod apply and not affecte as must until relearn/reload.
Example: talent 14983 and later applied glyph 42971.
Also drop dead code for removed in 3.x talent 12303.