Commit graph

82 commits

Author SHA1 Message Date
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
VladimirMangos
0838475415 [7850] Fixed '.pinfo name' work, move reputation code from it to new command '.character reputation [$name]'. 2009-05-19 01:03:39 +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
e134b5383b [7831] Prevent have hunter pet with level greater player levels at level changes. Propertly set hunter pet xp values at level update. 2009-05-15 05:33:46 +04:00
zhenya
8144f30199 [7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-04-29 01:05:21 +04:00
AlexDereka
c9d51a6dc7 [7716] Fixed some typos and possible crashes. 2009-04-26 18:49:07 +04:00
VladimirMangos
c2e6dd20dd [7715] Provided way for scripts set alternative gameobject state for client show.
Also use enum for gsmeobject states.
2009-04-26 07:21:11 +04:00
VladimirMangos
7fde7b8ca6 [7705] Rename some account/character related commands.
* .lockaccount -> .account lock
* .password    -> .account password
* .chardelete  -> .character delete
* .customize   -> .character customize
* .rename      -> .character rename
2009-04-24 02:46:11 +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
db2027feb0 [7614] Sort/rename debug commands, Move packet send commands to new ".debug send " subcommands list.
Also drop not implemented .debug inarc
Add to .debug send spellfail support for up to 2 additional args for spell fail packet.
2009-04-04 06:27:49 +04:00
arrai
bfe25d510b [7548] Fixed some commands by replacing !args with !*args check 2009-03-26 20:50:35 +01:00
VladimirMangos
c33eff13f4 [7540] Move most reputation/force faction reaction code to new ReputationMgr. 2009-03-26 11:28:56 +03:00
VladimirMangos
df9caf58cd [7538] Hide some implementation details for reputation/forced faction reaction. 2009-03-25 21:28:04 +03:00
VladimirMangos
3b3144004a [7537] Command .lookup player will report in case found accounts/ip but without existed characters. 2009-03-25 01:58:15 +03:00
AlexDereka
8a5e4706bc [7506] Remove dual ERROR in logs 2009-03-21 11:47:57 +03:00
VladimirMangos
e6aca46942 [7495] Fixed mangos_string entry text for .gobject target, and shift-links into .gobject turn/move output. 2009-03-19 20:11:04 +03:00
VladimirMangos
f80d13066d [7494] Add gameobject entry shift-link support into .gobject target and .gobject add commands.
Now for example shift-link from .lookup object results can be used in .gobject add.
2009-03-19 14:49:55 +03:00
VladimirMangos
a63977d767 [7493] Move .gobject functions in one place, update/fix security levels in code and mangos.sql. 2009-03-19 12:53:10 +03:00
VladimirMangos
bfa67880f2 [7492] Rename subcommands functions to names more similar related chat commands 2009-03-19 11:59:02 +03:00
VladimirMangos
7589bf7263 [7489] Update gameobject rotation fields if need.
* Fixed update absent in ".gobject turn" command
* Propetly set rotation fields for summoned objects
* Check rotation/coordinates fields values at server loading
2009-03-18 21:04:57 +03:00
multiplexer
d440ff3184 Restructured/Reordered Npc Commands
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-09 03:10:19 +03:00
balrok
54f2dbefa0 [7403] much more unneeded includes removed
now i extended my script:
NAME="Chat"; ack -c $NAME | ack ":1$" | sed 's/:1//' | xargs /usr/bin/ack-grep -l "include \""$NAME".h\"" | xargs /bin/sed -i '/include "'$NAME'.h"/d'

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-08 02:22:17 +03:00
balrok
f3ea479f6e removed duplicated includes
i used the following script
(i have no awk-skills :-/ i guess with awk it will look much better)
for i in `ls *.h`
do
    HEADER="#include \\\""`echo $i | sed 's/\./\\\\./'`"\\\"" #a grep-readable #include "file.h"
    # following should deletes the first occurence of a duplicated
    # (#include) line
    # if an include is more then once in this file this script
    # has to be run more often - i don't know a better solution
    grep -cH "$HEADER" *.[hcpp]* | grep -v :1$ | grep -v :0 | sed -r 's/:[0-9]*$//' | xargs sed -i '0,/#include "'$i'"/{//d;}'
done

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Restored build for x64: WorldSession expected to be fist include in WorldSession.cpp
2009-03-08 02:08:16 +03:00
VladimirMangos
be74937146 [7393] Implement access to client side holiday ids.
* src/game/GameEvent.* renamed to src/game/GameEventMgr.* for consistence
* `game_event` now have new `holiday` field for store client side holiday id associated with game event
* Added new enum HolidayIds with existed at this moment holiday ids.
* New function "bool IsHolidayActive(HolidayIds id)" added accessabel from scripts for active holidays check.
2009-03-07 03:00:17 +03:00
Neo2003
7d8dc0eeef Implemented gameobjects and creatures grouping (pools of them)
Groups (called pools) can be also member of any game event

Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
Signed-off-by: freghar <compmancz@gmail.com>
2009-02-18 20:19:57 +01:00
VladimirMangos
6793f9256f [7296] Fixed some GCC warnings. 2009-02-18 19:22:56 +03:00
GriffonHeart
74fdc7bee7 [7290] Command .npc setdeathstate on/off.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-17 13:33:41 +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
ed59d22dec [7215] .gobject setphase now really work. 2009-02-01 09:39:08 +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
VladimirMangos
aa24bd836e [7207] Phase system development continue for DB/in_game objects
* Store phase mask for creatures/gameobjects/corpse in DB
* Propertly set phase for summoned creatures/gameobjects/pets/corpses/spell related dynobjects
* Select proper phase for spawned creature/gameobjects and save it in DB

TODO: in game commands.
2009-01-31 06:11:50 +03:00
VladimirMangos
de277ad917 [7187] Replace some tabs in sources. 2009-01-26 15:07:12 +03:00
VladimirMangos
bbf8fd0742 Not store dependent spells in character_spell
* Mark spells learned in result character creating, another spell learning, skill grow,
  quest reward as dependent and not store its in `character_spell`.
* Prevent re-learning known spell in expected state
* Prevent re-learning low rank spell as active if higher rank known.
* New type of non-stacked ranked spells check: skill dependent spell bonuses.
* Activate (show propetly and cast if need) lesser spell rank
  for non-stackable in spellbooks spells at unlearn high rank
2009-01-24 12:03:43 +03:00
VladimirMangos
148b7fd3ab [7108] Allow use shift-links to creature entries (from .lookup creature) in .npc add command. 2009-01-18 22:18:34 +03:00
VladimirMangos
cc5fc88fb2 [7046] Do more security level checks in commands using HasLowerSecurity. Make use .account set addon safe for players. 2009-01-07 18:23:56 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01: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
tomrus88
ac4791e419 Merge branch 'master' into 303
Conflicts:
	src/game/CharacterHandler.cpp
	src/shared/Database/DBCStructure.h
2008-12-15 01:23:37 +03:00
balrok
a62801aee9 [6908] Faster setting online=0 at startup and semilar queries.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2008-12-15 00:13:39 +03:00
tomrus88
0f7077546f Implemented character customize future.
Not tested, but should work...
2008-12-12 01:44:52 +03:00
tomrus88
b2ca98fa4e Merge branch 'master' into 303 2008-11-18 21:10:48 +03:00
VladimirMangos
e3abf5c936 [6838] [2008_11_18_01_mangos_creature_movement.sql 2008_11_18_02_mangos_mangos_string.sql] Implement localization support for creature_movemant.
Implemented in same way as db script localization. creature_movemant now store indexes in db_script_string.
In game waypoint text setting disabled. Unclear how this possible implement with localization data.
2008-11-18 20:42:10 +03:00
tomrus88
397efd4fac Merge branch 'master' into 303
Conflicts:
	src/game/SpellEffects.cpp
2008-11-18 18:08:58 +03:00
hunuza
ac00eee418 Replace some MapManager::Instance().GetMap() calls with WorldObject::GetMap() 2008-11-17 17:24:53 +01:00
tomrus88
871d5f8c99 Small progress with vehicles 2008-11-12 00:49:19 +03:00
tomrus88
78ec66babc Merge branch 'master' into 303
Conflicts:
	contrib/extractor/System.cpp
	contrib/extractor/ad.exe
	src/game/WorldSocket.cpp
2008-11-06 15:50:47 +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
tomrus88
d4ab3ca463 Merge branch 'master' into 303 2008-11-04 18:28:39 +03:00