Some opcode handlers have many code with possible deep calling
far teleports by some reason (death, quest script, etc).
This can be triggering unexpected lost Map context and crashs result.
Note: player login opcode still have disbled delayed teleports (old way work)
just becase Player object created in it and not have flag set.
Calling point look not 100% safe but at this commit this way not chnages for while.
* Make possible have debug output if build in release mode.
* But preserver current optimization in avoid debug output args
calculation if debug ouput disabled if done using DEBUG_LOG
* Implement in same way BASIC_LOG, DETAIL_LOG. Recommended use
its instead explicit access to sLog
* Use variadic macros for DEBUG_LOG and other new defines.
All supported VS/GCC have its support as C++ extension.
* Add DEBUG_FILTER_LOG and semilar defines for filered log output and use its.
* Also move recent added debug output for transport events under LOG_FILTER_TRANSPORT_MOVES
* use UI64FMTD instead of "%u" for uint64 output
* on most *NIX systems, I64FMT is "%016lX" and not "%016llX"
* also fix typo: renamed GridMap::loadHeihgtData to GridMap::loadHeightData
Note: there are still many warnings from the 3rd party libraries g3dlite and ACE. Those warnings won't be fixed with that commit.
Also, a few warnings from MaNGOS are left, they'll be fixed later.
Signed-off-by: XTZGZoReX <xtzgzorex@gmail.com>
with this i also introduced a new status for opcodes
STATUS_UNHANDLED
not sure if i realy found all unhanddled opcodes
those are all based on empircal analysis of our serverlog
* Replace old `account`.`online` field by `account`.`active_realm_id`.
It have 0 if account offline.
NOTE: this break all scripts that use `online` field for seelct online characters, and it required update.
But from other side this reolve
* Bug with reset online state active realm at restart another realm.
* Let easy select online accounts for some specific realm if need.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
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>