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>
* Introduced new table character_battleground_data
* Entry point is now stored on BG enter event not join event
* Entry point for dungeons is now correctly set to nearest graveyard
(this prevent well known assert in GetInstance because of porting to already destroyed instance)
* Teleporting from BG correctly restore mount state
* Teleporting from BG correctly restore taxi flight
(in multipath flight you will end up in nearest transition point on the route)
Signed-off-by: ApoC <apoc@nymfe.net>
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define.
I64FMTD renamed to UI64FMTD for more clear name.
* Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals.
Please always use UI64LIT(0x00001) instead less portable 0x00001LL
* New extractOptFirstArg function for easy get 2 args in case option playe name as first arg.
* New extractPlayerTarget function for get player pointer/guid/name for online/offline player base at provided name
or if not provided by current seelction with error cases processing.
* Property apply mute/unmute in case use different character name from loggined currently for account.
* .reset commands can be used from console now
* .repairitems comamnd can be used from console now but only to online player.
Move near teleport landing code to WorldSession::HandleMoveTeleportAck.
This make Player::TeleportTo code working in same way for both far/near teleports.
Move mSemaphoreTeleport from WorldObject to Player and merge with DoNotMove (using 2 fields for far/near teleport flag).
Skip movement packets until landing confirmation for near teleport from client.
* Also rewrite use SMSG_PLAY_OBJECT_SOUND/SMSG_PLAY_SOUND
Now WorldObject have 2 function for sound level dependent from distance (PlayDistanceSound)
and for not depednet (PlayDirectSound)
* Old Player::PlaySound function removed and uses need to be updated to WorldObject functions
Note: function called for _source_ of sound in different from old function.
* chat command .debug ps removed and .debug playsound can used for bother packects test:
if no selection used SMSG_PLAY_SOUND, if selection exist including self then SMSG_PLAY_OBJECT_SOUND.
* Load homebind data early in Player::LoadFromDB and use instead initital race points
in cases need some safe point if current coordinate broken by some reason.
* Store BG entry point in to WorldLocation and simplify calls.
* Set bg entry point at GM teleports to battleground for correct
auto-recall position at battleground end.
* Implement support 'Hplayer' link type. Mostly as player name highlights in command messages.
* Support shift-links parsing withoyt '|c' color prefix
* Many related code cleanups.
* 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).
Warior 42770, 58872 and ranks
Warlock 47230 and ranks, for 39372 use m_amount instead hardcoded value
Rogue 51669 and ranks, 51625 and ranks
Hunter:
53290 and ranks (need handle regen amount for 57669)
56342 and ranks (from periodic)
53228 and ranks (only mana regen part)
Shaman:
58877 (aura should on summoned wolf)
51556 and ranks (need handle dummy for 52759)
16180 and ranks, 51525 and ranks
Death Knight 50365 and 50371, 48979 and ranks, 49005, 61257, 49217
Signed-off-by: DiSlord <dislord@nomail.com>
This is just a simple check if target's gmlevel is lesser
than the caller's one. If it is, an error is returned.
Offline checks for some commands are included.
That in simple words means no further .goname to a gmlevel 3 player
from a gmlevel 2 or 1 account, so gmlevel 3 can work in peace.
Signed-off-by: freghar <compmancz@gmail.com>
Many thanks also to:
Balrok@github.com for long time updating.
Triply@github.com for great work in rewriting process.
All who I forget to name.
Signed-off-by: ApoC <apoc@nymfe.net>
Including fix _SCallback for 3 params, triggred mode correct call for .cast back and .cast target.
Remove outdated code for support old 19421 (and ranks) implementation in client data.
* Provided ChatHandler::GetName for player name/"console command" output dependent from chat/console command call.
* New function for check when command work result send to command target.
* Remove unrequired complexy in mangos string usage in some commands.
Now console/RA uas same commads as used in chat if selected command marked as safe for console.
Some commands accessable only at console and have security level 4. See sql update for new command names.
Not all commands that safe (or can be modified to safe) for console allowed currently for use in console input, this will be fixed later.