Commit graph

39 commits

Author SHA1 Message Date
Machiavelli
21a3ee9267 [12079] Remove some redundant explicit NULL checks for pointers before delete or delete[] calls since this check is done implicitly when deleting
Signed-off-by: stfx <stfx@hotmail.de>
2012-08-03 14:30:18 +02:00
stfx
3707b04330 [12066] Optimize some parts for ++C 2012-07-21 17:15:11 +02:00
Schmoozerd
e32b9953a1 Cleanup Operator padding 2012-07-20 17:38:23 +02:00
Schmoozerd
6379a746d7 Various Cleanups (game T-Z) 2012-07-19 21:52:26 +02:00
Schmoozerd
8e0edc0383 [11940] Rewrite and cleanup DB Script Engine
* Moved actual script processing code to ScriptMgr
* Unifed and improved log output. Now table-name is passed to each script execution
* Added the "buddy concept" to all commands (except the outdated direct field change commands):
Now all commands support to search a creature (or go for some commands) in a radius, with which to do some stuff.
See doc/script_commands.txt for more details and information

Attention DB Devs:
Current DB-Scripts are converted automatically as far as possible, but some old target selecting mechanics were not reasonable to do automated.
For such cases the command is marked with data_flags & 0x10 (==16), which will throw DB-Errors to track them down faster

Thanks to NeatElves and especially Grz3s for testing!

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-06 22:04:30 +02:00
Schmoozerd
8068dcf6dd [11875] Update Copyright notice to year 2012
Start timemachine and a Happy new year to all!
2012-01-16 17:43:59 +01:00
VladimirMangos
c870ef324d [11590] Cleanups for barGoLink
* Rename barGoLink -> BarGoLink as expected by mangos code style
* Add uint32/uint6 constructor versions for BarGoLink,
  and remove lot casts required before for BarGoLink use
2011-06-03 12:02:49 +04:00
NoFantasy
3251f39684 [11081] Beautify some SQL log queries and remove not needed enclose character
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-01-29 10:40:36 +01:00
VladimirMangos
a0e298179c [10952] Don't use singleton to access static functions. 2011-01-03 14:55:55 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
zergtmn
0d6f990e4e [10912] Move scripting related functions from ObjectMgr to ScriptMgr 2010-12-24 00:23:37 +05:00
Ambal
f67d89f109 [10727] Map system re-engineered. Special thanks to Blueboy for tests.
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-11-16 21:08:28 +02:00
blueboy
ee8cc71e38 [10692] Fixed wrongly use %d for guids in DB queries.
This can affect correct result in cases big guid values
(out of range for possitive part of int32 range) at x86 platforms.

Some other cases addded in addition to original patch fixes
where %d wrongly/unsafe used for unsigned values.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-07 22:10:37 +03:00
NoFantasy
9aa683f0e9 [10488] Fix checking text id's for creature_movement_template
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-15 11:57:18 +02:00
VladimirMangos
acd0716297 [10432] Rename ASSERT -> MANGOS_ASSERT and related fixes
ASSERT hard use in predictable way because diff. 3rd party libs code
redefine it inf different ways and hard make sure that used in end
of mangos define version. This is real detected problem make some
expected assert checks ignored and so bugs not detected as expected from code.

In addition made related changes:
* Common.h header expected to be first include in any src/game/header except most simple cases.
* Related FILE.h header expected to be first include in FILE.cpp
* Fixed some absent includes and type forwards for safe build without PCH enabled.
* Avoid using MANGOS_ASSERT in src/framework code
2010-09-02 05:13:16 +04:00
NoFantasy
db7db6382a [10362] Implement creature_movement_template
Template can be used for several cases:
* Unique creature that are already spawned in database (requires creature.MovementType=2 like guid based creature_movement)
* Summoned creature that has a pre-defined path (requires creature_template.MovementType=2)

Note that creature_template.MovementType=2 should be used with care, and must not be used for creatures that may be summoned in random locations in world.

Added additional startup checks for existing creature_movement-table

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-16 14:39:45 +02:00
VladimirMangos
6d5d8778fa [9912] Partly revert [9911] :/ 2010-05-16 09:51:52 +04:00
VladimirMangos
112afc260c [9911] Check script using and existance at creature_movement_scripts load. 2010-05-16 09:26:48 +04:00
NoFantasy
312a076491 [9891] Implement *_scripts for creature_movement
New field script_id in creature_movement can be filled for each waypoint point and run the corresponding script from creature_movement_scripts.
Script_id can be any value and several points/creatures can share the same script (with limits of course, such as script depending on location and other factors).

DB projects are advised to move current text, spells and emotes data in creature_movement fields as these fields are strictly no longer needed and may be fully removed in the future.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-14 12:16:54 +02:00
XTZGZoReX
51fd11c92c [9638] Replace all C assert()s with MaNGOS ASSERT() macro. 2010-03-29 19:29:42 +02:00
AlexDereka
5368751c13 [9386] Store some config values in Rate emun. 2010-02-15 00:17:44 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
balrok
33c6241fd8 [8811] check creature existance at waypoint loading
also just set the spellid to 0 if it doesn't exist
instead of dorpping the whole movementpoint
2009-11-13 20:49:02 +01:00
balrok
25ab89ce97 [8810] error output at loading when creature_movement has nonexistant spell 2009-11-13 13:57:37 +01:00
XTZGZoReX
0734adb746 [8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr
 * spellmgr -> sSpellMgr
 * WaypointMgr -> sWaypointMgr
 * poolhandler -> sPoolMgr
 * objaccessor -> sObjectAccessor
 * mapmgr -> sMapMgr
 * sInstanceSaveManager -> sInstanceSaveMgr
 * ticketmgr -> sTicketMgr
 * CreatureEAI_Mgr -> sEventAIMgr
 * auctionmgr -> sAuctionMgr
 * achievementmgr -> sAchievementMgr
2009-11-08 12:11:34 +01:00
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
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
zhenya
8144f30199 [7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-04-29 01:05:21 +04:00
NoFantasy
ee9ea143d1 [7689] Batter EventAI loading checks and fix one from possible crash cases.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-04-19 23:51:05 +04:00
ApoC
66b9cf7829 [7592] Correct delay loading for creature waypoints.
Now it allows to assign more than cca 65s delay on waypoint.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-03-31 23:09:18 +02:00
AlexDereka
8a5e4706bc [7506] Remove dual ERROR in logs 2009-03-21 11:47:57 +03:00
begemot
9bede601a2 [7151] Startup log cleanup and beautification.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-01-23 04:29:35 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
VladimirMangos
151e9e7012 [6989] Always initilize WaypointBehavior pointer to NULL in WaypointNode. Small code Cleanup. 2008-12-31 00:48:44 +03:00
ApoC
cd50762206 [6841] Fixed texts loading for waypoints. Better reporting of unused
script text, now it excludes from report also ids used for waypoints.
Signed-off-by: ApoC <apoc@nymfe.net>
2008-11-21 12:38:15 +01: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
VladimirMangos
166007525e More fixes for wrong format arg/value pairs. 2008-11-03 01:48:16 +03:00
TheLuda
800ee76535 Imported MaNGOS revision 6767 from http://mangos.svn.sourceforge.net/svnroot/mangos/trunk/ 2008-10-14 00:29:20 +02:00