Commit graph

14 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
VladimirMangos
9f41772828 [8102] Simplify code base at new root method WorldObject::CleanupsBeforeDelete
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
2009-07-01 11:09:34 +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
AlexDereka
255ed61a86 [7756] Fixed memory leak in PoolHandler::Initialize(). 2009-05-04 12:23:13 +04:00
AlexDereka
27fabf7ace [7745] Fixed gcc warnings. 2009-05-03 20:25:27 +04:00
VladimirMangos
c5d9b6cf7b [7555] Check pool_id bafire access to pool data in PoolHandler::CheckPool 2009-03-28 00:04:39 +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
6c39db38f4 removed unneeded World.h includes
this is done by this script:
ack -c "World.h" | ack :1 | sed 's/:1//' | xargs grep -c sWorld | grep :0 | sed 's/:0//' | xargs sed -i '/#include "World.h"/d'
i didn't checked every change but gcc haven't complained
2009-03-08 01:26:52 +03:00
VladimirMangos
b419c0ed03 [7304] Move inner template class from parent class definition for better compatibility with some GCC versions. 2009-02-19 15:45:27 +03:00
miranda.conrado
4b46374577 [7302] Fixed build at Unix/Linux.
Signed-off-by: miranda.conrado <miranda.conrado@getmangos.com>

Possible fix, not checked (not have access currently to Unix host), but expected as working.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-19 12:53:41 +03:00
arrai
1206026b44 [7301] Partially restored linux build 2009-02-18 23:34:54 +01:00
Neo2003
125bf4bfd6 [7299] Implemented circular loop detection for pools in pools
As a result, the last relation that makes the loop is automatically removed.
An error message is displayed and core go on loading remaining records.

Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
2009-02-18 20:20:12 +01:00
Neo2003
5da8bdf16e Added support for pools in pools
Pools inside another pool cannot have a number of spawned objects <> 1 (maxlimit value)

Note: pools in a pool in a pool in a pool... is possible and working,
but circulare inclusion is not detected and will cause a core infinit loop

Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
2009-02-18 20:19:59 +01: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