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>
(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.
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>
* Move CMSG_MOVE_KNOCK_BACK_ACK (player case) to Unit::KnockBackFrom
* Implement creature case, most at hack way currently :(
Need information about expected server packet, and possible some disorientation movegen apply at short time.
* In adition of spell 781 implement related creature versions.
* Fixed warnings spawn at reading CMSG_MOVE_KNOCK_BACK_ACK, CMSG_MOVE_HOVER_ACK, CMSG_MOVE_WATER_WALK_ACK.
* Added basic infrastructure for visibility update in case difference player and current view point.
Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
Without additional changes and not implemented (you will see empty area without creatures in likes case)
* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
* Rename IsSingleFromSpellSpecificPerCaster to IsSingleFromSpellSpecificPerTargetPerCaster for clear meaning.
* Rename IsSingleFromSpellSpecificRanksPerTarget to IsSingleFromSpellSpecificSpellRanksPerTarget for clear meaning.
* Add new IsSingleFromSpellSpecificPerTarget for case single spell specific aura allowed to be at target from any caster and use it.
Move some spell psecific checks (mostly sellf casted) from IsSingleFromSpellSpecificPerCaster to new function.
* Propertly reject self targeting for pet spell 2947 and ranks, and spell 54646.
* Some related fixes for pet spells with target mode TARGET_SINGLE_FRIEND_2
* Implement original caster bonus part of spell 54646.
* Use counter for aura uses lock for recursivly mark as used in some cases.
* At aura remove add aura to deleting delayed auras list for aura target.
* Remove now unneeded hacks from aura handlers and aura tick code (maybe not all found yet)
* Use new aura delete locking for simplify proc spell event code.
* Prevent apply aura boost spells if aura deleted while adding to target by triggered spells.
* Re-implement aura list updating at auras update for target to better way skip
removed from aura list auras while auras update.
This provided more clear place where dependent auras can be applied/removed,
if expected manual apply _with_ aura remove at parent aura expire.
This can be used for more cases.
In current state it implement additional effects for
29836 and ranks, 61846 and ranks, 31869, 53379 and ranks, 20254 and ranks,
20138 an ranks, 48263, and 48265.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Added a new SQL table, spell_proc_item_enchant, for "custom" ppmRates on Item Enchants that do not use auras.
With table data this must fix ppm for effect from 8033 and ranks enchanting, and item 6947/10918 and ranks enchanting.
* Implemented SPELLMOD_FREQUENCY_OF_SUCCESS (26).
That must fix work talent 14113, spell 32645 with ranks, glyph 41094 and item set effect 64917 in frequency part.
Thanks to MaS0n as author alternative patch that partly used in this patch.
Thanks to Thenecromancer as author alternative patch that ideas inspire MaS0n's patch writing and then this patch also.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* This can prevent removing single cast aura of same id and effect
but different caster what can cause assert in next code.
Thanks Vladimir for hints.
Signed-off-by: ApoC <apoc@nymfe.net>
* Support correct aura state at server set for different casters effects
* Correctly check this telent (per caster) aura state at cast
* Correctly show per-caster aura state for cleitns.