Commit graph

101 commits

Author SHA1 Message Date
balrok
bd30769dec [8475] fixed some gcc-warnings
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>
2009-09-05 13:47:47 +02:00
tomrus88
4a8431f581 Merge commit 'origin/master' into 320
Conflicts:
	src/game/DBCStructure.h
	src/game/DBCfmt.h
	src/game/MiscHandler.cpp
	src/game/ObjectMgr.cpp
2009-09-04 21:16:59 +04:00
balrok
57158e9185 [8457] display summoner to summoned at .namego command 2009-09-03 20:18:35 +02:00
tomrus88
f07363e9e0 Merge commit 'origin/master' into 320
Conflicts:
	src/game/MovementHandler.cpp
	src/game/Player.cpp
2009-08-09 20:18:41 +04:00
ApoC
6d9448dd7f [8339] Improved storing/restoring BG entry point
* 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>
2009-08-09 11:00:37 +02:00
tomrus88
02bcc56919 Added placeholders for new battlegrounds, some other stuff. 2009-06-25 19:08:53 +04:00
VladimirMangos
f34ce077c0 [8071] Restore work .modify tp command. Allow apply it to selected character's pet. 2009-06-23 04:46:13 +04:00
Ambal
b76c4c2f3c [8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-06-16 12:47:02 +04:00
NoFantasy
be6e3923d1 [7948] Use SetFaction instead explcit field set, other cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-03 15:35:33 +04:00
VladimirMangos
2a27a44e2a [7918] Improve portability in work with uint64 string format specifiers and in code literals.
* 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
2009-05-30 22:44:20 +04:00
tomrus88
42f8ce5f3e [7911] Applied coding style. 2009-05-29 19:07:28 +04:00
VladimirMangos
f271fd6819 [7893] Fixed work chat guild commands that expect guild name in args. Now guild name always must be in "". 2009-05-25 06:31:17 +04:00
VladimirMangos
e712baa58c [7851] Fixed typo to allow work '.tele name' command. 2009-05-19 01:36:29 +04:00
VladimirMangos
fdbc22ac93 Provide and use universal way for get locale and locale index for chat/console command use. 2009-05-19 01:02:10 +04:00
VladimirMangos
1f2670facf [7839] Rafactoring player targeting code in chat command and related cleanups/improvments.
* 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.
2009-05-17 14:29:55 +04:00
VladimirMangos
3c057a92f5 [7803] Prevent ignore max money limit at use .modify money command. 2009-05-08 21:32:20 +04:00
VladimirMangos
a587590ab5 [7796] Implement .lookup taxinode and .go taxinode commands. 2009-05-07 19:37:14 +04:00
VladimirMangos
fc0e1ecdf1 [7690] Move GetCreature/GetGameobject to class Map.
* This let get objects at map without reference to player or another object.
* Simplify future implementation for per-map storage for like objects
2009-04-20 19:08:13 +04:00
VladimirMangos
199c09640d [7648] Resolve problems with expected fall damage at near teleport.
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.
2009-04-11 11:06:30 +04:00
VladimirMangos
8fe9008132 [7613] Sort and rename functions for GM commands in code. 2009-04-04 05:06:23 +04:00
VladimirMangos
cc19245ce4 [7554] Prevent accepting wrong numeric args as 0.0f in .go zone command 2009-03-27 20:30:28 +03:00
VladimirMangos
ab2bdc3e69 [7518] Implement new script command SCRIPT_COMMAND_PLAY_SOUND (look in World.h for args)
* 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.
2009-03-23 00:27:01 +03:00
VladimirMangos
bfa67880f2 [7492] Rename subcommands functions to names more similar related chat commands 2009-03-19 11:59:02 +03:00
VladimirMangos
a7fd57cc74 [7487] Avoid attempt use InstanceSave data for non-dungeons.
Also check map existance and correctness at instance data loading.
Removed unused and totally bugged InstanceMap::GetResetTime.
2009-03-18 16:48:54 +03:00
VladimirMangos
329fb3f9d1 [7440] Use server-side only zone info. Optimize related calles in case zone and subzone use.
This in some cases make some zones not explorable if it not have server side data in current maps
but not allow cheating with zone set from client.
2009-03-11 10:08:12 +03:00
DiSlord
071a0317f0 [7439] Fix wrong liquid level in some places. Need reectract maps.
Remove some log on extract maps.
Add liquid status log to .gps command

Signed-off-by: DiSlord <dislord@nomail.com>
2009-03-11 00:04:19 +03:00
multiplexer
d440ff3184 Restructured/Reordered Npc Commands
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-09 03:10:19 +03:00
Triply
a81d174288 [7353] Fixed problem with joining rated arena matches. Thanks to balrok for help.
Signed-off-by: Triply <triply@getmangos.com>
2009-02-27 14:20:31 +01:00
VladimirMangos
bf5e1908d6 Drop Say/Yell/etc string versions.
1) DB based string_id versions must be used.
2) for debug purposes raw WorldObject::MonsterSay/etc versions can be used
2009-02-19 11:59:01 +03:00
VladimirMangos
8af53064eb [7254] Cleanups and batter checking in homebind/bgEntryPoint code.
* 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.
2009-02-09 15:50:40 +03:00
balrok
22cb305002 allow .goname and .namego in more battleground cases
Signed-off-by: balrok <der-coole-carl@gmx.net>
2009-02-08 11:29:35 +03:00
VladimirMangos
42e12136a8 [7221] Add output player names as sift-links in more chat commands. 2009-02-02 23:14:05 +03:00
VladimirMangos
4039fa8a4a [7219] Improvements ins shift-links work.
* 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.
2009-02-02 03:10:47 +03:00
VladimirMangos
4602ff9c21 [7214] Phase system continue development - Commands and fixes.
* 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).
2009-02-01 08:13:16 +03:00
DiSlord
c01fe58723 Implement some dummy triggers
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>
2009-01-17 21:03:36 +03:00
DiSlord
d6c58df0e6 Allow use .modify bit on units
Signed-off-by: DiSlord <dislord@nomail.com>
2009-01-15 19:54:54 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
VladimirMangos
bd4fc1b0ae [7005] Request Area/Zone Ids using 3D coordinates.
.map files not have 3D specifci area infor. So use hack way for update areaflag for some cases (areas 4281, 4342)
where exist area dependent auras.
2009-01-02 19:30:43 +03:00
freghar
73ca2b7a54 [6982] Implemented gmlevel-based command security
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>
2008-12-29 23:54:05 +01:00
Arthorius
41cbc67dfc [6960] Implement ".modify runnicpower" command.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2008-12-28 03:23:03 +03:00
ApoC
a5331ab517 [6910] Implemented rewritten arenas. Original author w12x@getmangos.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>
2008-12-16 00:17:24 +01:00
VladimirMangos
3da9f3f4cc [6889] Backport some not client version specific changes and fixes from 303 branch. 2008-12-09 14:08:29 +03:00
hunuza
ac00eee418 Replace some MapManager::Instance().GetMap() calls with WorldObject::GetMap() 2008-11-17 17:24:53 +01:00
VladimirMangos
ad59efb6d9 [2008_11_09_01_mangos_command.sql] Create new command .senditems and remove from moderator level command .sendmail possibility send items. 2008-11-09 11:01:41 +03:00
VladimirMangos
88b1974df6 Fixed warnings, unused code and typos.
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.
2008-11-05 05:06:35 +03:00
VladimirMangos
83f034ae5d Some command handlers renames and declaration sorting. 2008-10-30 05:14:14 +03:00
VladimirMangos
6169f57ab9 Simplify check requirement report command results to target and output command user name.
* 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.
2008-10-28 14:55:17 +03:00
VladimirMangos
b10349a737 [sql/updates/2008_10_22_02_mangos_mangos_string.sql] Allow use in console .event/.reload/.lookup/.list (some)/.guild (some) subcommands. 2008-10-23 03:07:22 +04:00
VladimirMangos
26dc8c07ab * [2008_10_21_01_mangos_mangos_string.sql,2008_10_21_02_mangos_command.sql] Merge CLI command proccessing to chat command proccessing.
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.
2008-10-21 08:05:21 +04:00
TheLuda
adc46ef907 Applied new coding standard, see http://github.com/mangos/mangos/wikis/codingstandards for more. 2008-10-15 18:26:08 +02:00