Commit Graph

8176 Commits

Author SHA1 Message Date
Anubisss e7faef7e76 Fix a memleak in AddSC_borean_tundra().
Log:

==31592== 312 bytes in 1 blocks are definitely lost in loss record 423 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xFC12AF: AddSC_borean_tundra() (borean_tundra.cpp:2408)
==31592==    by 0xDC0BF0: AddScripts() (ScriptLoader.cpp:917)
==31592==    by 0xC183F3: ScriptMgr::ScriptsInit() (ScriptMgr.cpp:70)
==31592==    by 0xD1B75F: World::SetInitialWorldSettings() (World.cpp:1608)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)

--HG--
branch : trunk
2010-05-13 00:52:04 +02:00
Anubisss 46a14891c0 Forget to call clear() for a vector from my previous commit.
--HG--
branch : trunk
2010-05-13 00:47:28 +02:00
Anubisss cdb7b3227b Call WaypointMgr's Free() in its destructor.
Deallocate memory in Free() which allocated by WaypointMgr.

This fixes memory leaks caused by waypoints.

Valgrind log:

==31592== 2,203,488 (59,400 direct, 2,144,088 indirect) bytes in 2,475 blocks are definitely lost in loss record 1,230 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xD0EC23: WaypointStore::Load() (WaypointManager.cpp:70)
==31592==    by 0xD1B55D: World::SetInitialWorldSettings() (World.cpp:1565)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)
==31592==
==31592==
==31592== 160 bytes in 5 blocks are possibly lost in loss record 10 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xD0EC0D: WaypointStore::Load() (WaypointManager.cpp:67)
==31592==    by 0xD1B55D: World::SetInitialWorldSettings() (World.cpp:1565)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)
==31592==
==31592==
==31592== 384 bytes in 2 blocks are possibly lost in loss record 285 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xD0F2D4: __gnu_cxx::new_allocator<WaypointData*>::allocate(unsigned long, void const*) (new_allocator.h:92)
==31592==    by 0xD0F303: std::_Vector_base<WaypointData*, std::allocator<WaypointData*> >::_M_allocate(unsigned long) (stl_vector.h:144)
==31592==    by 0xD0F87B: std::vector<WaypointData*, std::allocator<WaypointData*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<WaypointData**, std::vector<WaypointData*, std::allocator<WaypointData*> > >, WaypointData* const&) (vector.tcc:308)
==31592==    by 0xD0F9F7: std::vector<WaypointData*, std::allocator<WaypointData*> >::push_back(WaypointData* const&) (stl_vector.h:694)
==31592==    by 0xD0ED0B: WaypointStore::Load() (WaypointManager.cpp:89)
==31592==    by 0xD1B55D: World::SetInitialWorldSettings() (World.cpp:1565)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)

--HG--
branch : trunk
2010-05-13 00:42:37 +02:00
Machiavelli 5d70f62c07 Global cooldown for players should never exceed 1,5 seconds. Fixes issue #1998
--HG--
branch : trunk
2010-05-13 00:37:43 +02:00
Spp a3a8e6da2c Some warning fix
Tab to spaces
Remove trailing spaces

--HG--
branch : trunk
2010-05-13 00:15:21 +02:00
Anubisss 4a448eca37 Make WaypointMgr to singleton.
Move global waypoint_map variable to WaypointMgr's private variable.

--HG--
branch : trunk
2010-05-13 00:08:30 +02:00
Anubisss 8223af6576 Delete ALL scripts which not assigned instead of delete scripts which not assigned AND its ScriptName not contains the word "example", in Script::RegisterSelf().
So fixes memleaks in scripts which scriptname contains the "example" word AND not assigned(ScriptName column in DB) to an object.

This ones fixed: example_creature, example_escort, example_areatrigger, example_item, example_go_teleporter, example_gossip_codebox.

Some valgrind log: :)

==31592== 353 (312 direct, 41 indirect) bytes in 1 blocks are definitely lost in loss record 280 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xEFAC8A: AddSC_example_creature() (example_creature.cpp:286)
==31592==    by 0xDC047A: AddScripts() (ScriptLoader.cpp:523)
==31592==    by 0xC183F3: ScriptMgr::ScriptsInit() (ScriptMgr.cpp:70)
==31592==    by 0xD1B75F: World::SetInitialWorldSettings() (World.cpp:1608)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)
==31592==
==31592==
==31592== 351 (312 direct, 39 indirect) bytes in 1 blocks are definitely lost in loss record 281 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xEFB426: AddSC_example_escort() (example_escort.cpp:223)
==31592==    by 0xDC047F: AddScripts() (ScriptLoader.cpp:524)
==31592==    by 0xC183F3: ScriptMgr::ScriptsInit() (ScriptMgr.cpp:70)
==31592==    by 0xD1B75F: World::SetInitialWorldSettings() (World.cpp:1608)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)
==31592==
==31592==
==31592== 359 (312 direct, 47 indirect) bytes in 1 blocks are definitely lost in loss record 282 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xEFBCB6: AddSC_example_gossip_codebox() (example_gossip_codebox.cpp:93)
==31592==    by 0xDC0484: AddScripts() (ScriptLoader.cpp:525)
==31592==    by 0xC183F3: ScriptMgr::ScriptsInit() (ScriptMgr.cpp:70)
==31592==    by 0xD1B75F: World::SetInitialWorldSettings() (World.cpp:1608)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)
==31592==
==31592==
==31592== 358 (312 direct, 46 indirect) bytes in 1 blocks are definitely lost in loss record 283 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xEFC04B: AddSC_example_misc() (example_misc.cpp:65)
==31592==    by 0xDC0489: AddScripts() (ScriptLoader.cpp:526)
==31592==    by 0xC183F3: ScriptMgr::ScriptsInit() (ScriptMgr.cpp:70)
==31592==    by 0xD1B75F: World::SetInitialWorldSettings() (World.cpp:1608)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)
==31592==
==31592==
==31592== 356 (312 direct, 44 indirect) bytes in 1 blocks are definitely lost in loss record 501 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xEFBF96: AddSC_example_misc() (example_misc.cpp:55)
==31592==    by 0xDC0489: AddScripts() (ScriptLoader.cpp:526)
==31592==    by 0xC183F3: ScriptMgr::ScriptsInit() (ScriptMgr.cpp:70)
==31592==    by 0xD1B75F: World::SetInitialWorldSettings() (World.cpp:1608)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)
==31592==
==31592==
==31592== 349 (312 direct, 37 indirect) bytes in 1 blocks are definitely lost in loss record 1,209 of 1,232
==31592==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==31592==    by 0xEFBFDB: AddSC_example_misc() (example_misc.cpp:60)
==31592==    by 0xDC0489: AddScripts() (ScriptLoader.cpp:526)
==31592==    by 0xC183F3: ScriptMgr::ScriptsInit() (ScriptMgr.cpp:70)
==31592==    by 0xD1B75F: World::SetInitialWorldSettings() (World.cpp:1608)
==31592==    by 0x90F34E: Master::Run() (Master.cpp:234)
==31592==    by 0x90E87E: main (Main.cpp:146)

--HG--
branch : trunk
2010-05-12 23:30:41 +02:00
Machiavelli 7336157d7e Remove Non-Blizzlike hack for spell 25899 - Greater Blessing of Sanctuary. It now gives 10% strength increase as intended.
--HG--
branch : trunk
2010-05-12 23:18:03 +02:00
Anubisss 737ebb99f7 Delete an unused variable.
--HG--
branch : trunk
2010-05-12 22:37:03 +02:00
Machiavelli 118268bc9d Merge
--HG--
branch : trunk
2010-05-12 22:18:49 +02:00
Anubisss 02e0136867 Fix the bug that client can see incompatible realms in the RealmList.
--HG--
branch : trunk
2010-05-12 22:08:43 +02:00
Machiavelli 08effa0ae7 Replace some WorldSocket code with Derex´s code for MaNGOS to support packets > 64kb.
This get rid of the ¨queue¨ that only supported 1 packet and implement it properly. Meaning no ¨internal¨ packet loss obstructing the client/server I/O.
Apply Trinity code style where applicable.

--HG--
branch : trunk
2010-05-12 22:03:07 +02:00
Rat 8dfbb15b2a added Honorable Defender buff for Alterac Valley nodes + bosses + captains
--HG--
branch : trunk
2010-05-12 21:34:07 +02:00
teacher 8a60550d9d Added missing sql data to fulls.
Proper renaming and reformatting for some sql files.
Removed not-core-related data. You can find it in the usual place: http://trinitydatabase.org/index.php?/forum/122-core-related-db-content/

--HG--
branch : trunk
2010-05-12 20:18:04 +02:00
Rat b88984f30a added Honorable Defender buff for Eye of the storm nodes
ignore one unknown area trigger near fel reaver graveyard

--HG--
branch : trunk
2010-05-12 08:48:21 +02:00
Rat 6f06008f6b make BG kill XP configable, default off
--HG--
branch : trunk
2010-05-12 07:53:13 +02:00
Rat bfa0588fac typo :(
should olso fix linux compile

--HG--
branch : trunk
2010-05-12 07:32:04 +02:00
Rat 75c1364682 added Honorable Defender buff for Arathi Basin nodes
-players protecting their bases will gain +50% honor near the base

--HG--
branch : trunk
2010-05-12 00:23:00 +02:00
Rat df6a39cebc give xp only in BattleGrounds and not in arenas
--HG--
branch : trunk
2010-05-11 21:48:03 +02:00
Rat eae6f5c094 started implementing battleground experience system
-players gain xp by killing enemy players (event bonuses not added for now)
-player can switch xp gain on/off by talking to npc Slahtz or Behsten for a fee of 10golds
NOTE: turning off xp gain will turn off ALL xp gains from quests,monsters,pvp,etc

--HG--
branch : trunk
2010-05-11 21:42:39 +02:00
Machiavelli bf9694a354 Spell custom attribute data for Northrend faction commendation badges (spells 61306,61308,61311,61312,69757). They now give proper reputation
--HG--
branch : trunk
2010-05-11 18:43:47 +02:00
Spp 19010df80f Force animprogress for GameObjects Type FishNode
Original patch by beberlescaraber

--HG--
branch : trunk
2010-05-10 12:48:35 +02:00
Machiavelli 758faad1ca Typo.
(Need more caffeine)

--HG--
branch : trunk
2010-05-10 21:38:05 +02:00
Machiavelli 4335d97f37 Fix typo that occured in the mess of exporting/stripping, my humble apologies.
--HG--
branch : trunk
2010-05-10 20:31:24 +02:00
Machiavelli b468669ef7 Merge
Thanks to Aokromes for helping me test my previous commit

--HG--
branch : trunk
2010-05-10 19:50:05 +02:00
Machiavelli d2f35a2045 Cleanup and optimization in realmd netcode.
- Get rid of some potential memory leaks and lingering connections issues.
- Code style cleanup where applicable.

Please give proper feedback and let me know how she fares.

--HG--
branch : trunk
2010-05-10 18:06:28 +02:00
click 5626c294e4 Remove double-included headers from script + remove whitespace. Closes issue 2091.
--HG--
branch : trunk
2010-05-10 16:48:39 +02:00
Brian 7957d06654 * Add SCRIPT_COMMAND_CLOSE_GOSSIP that can be used in gossip_scripts to force
* the gossip window to close when a given menu option is chosen.
* This is with all my love -- for Malcrom :P

--HG--
branch : trunk
2010-05-07 19:17:51 -06:00
click 608855f0a0 Stop drinking heavily and instead do things properly - fixes a typo from previous commit...
--HG--
branch : trunk
2010-05-10 14:14:07 +02:00
click 7817596a96 Fix the little messup from the previous commit (sorry!)
--HG--
branch : trunk
2010-05-10 14:08:53 +02:00
click d79f6295aa Add support for NPC-based start of playing moviesequence + clean up indenting on earlier commit
--HG--
branch : trunk
2010-05-10 13:27:18 +02:00
click 5b20d478ff Another little fix on hunter Disengage - stop it from being usable when rooted
--HG--
branch : trunk
2010-05-10 03:02:30 +02:00
click c214b4afb0 Correctly complete quests with QUEST_FLAGS_AUTO_ACCEPT which should be completed the moment you accept it.
This fixes the quests which weren't completable in starting areas. Fixes issue #2042. Patch by liberate.

--HG--
branch : trunk
2010-05-10 02:59:41 +02:00
Spp 3b3f0caa69 Fix a crash in GameObject::TakenDamage
Fixes issue 2082

--HG--
branch : trunk
2010-05-09 21:32:49 +02:00
click 02dfc46849 Fix hunters Disengage - disallow use when not in combat + use correct text when attempting to use it out of combat
Patch by mrDiver - fixes issue #568.

--HG--
branch : trunk
2010-05-09 08:39:25 +02:00
Spp 8154f98737 Backout 8109.
--HG--
branch : trunk
2010-05-09 06:31:54 +02:00
Spp e3caa446aa Show GameObject HealthBar
Original patch by beberlescaraber
Closes issue 2056

--HG--
branch : trunk
2010-05-09 06:25:06 +02:00
Brian 42a379bfb1 * Fix the damn everloving neutral assist once again
* Patch coutesy of PivoNRoll

--HG--
branch : trunk
2010-05-06 02:13:15 -06:00
click f60d534b73 Cleanup on some database-related files: merge some DB-related files, add some consistency to callhandles in sourcetree (M
+ combine MySQL-specific files into main database-files (click)
+ fix vcproj-files, adjust handler-function names for consistency (Machiavelli)

--HG--
branch : trunk
2010-05-08 05:03:32 +02:00
Spp d6df19cd99 Add GUID to groups
--HG--
branch : trunk
2010-05-08 01:58:47 +02:00
Trazom62 0d06050eb4 Fix Beacon Of Light: not applying when not in LoS. Patch by beberlescaraber (adapted to latest rev).
Fixes issue #921.

--HG--
branch : trunk
2010-05-06 21:07:20 +02:00
Trazom62 c7c6a11ed6 Fix Script AzjolNerub/Anubarak. Patch by Snakeice.
Fixes issue #2022.

- Closes the ring, dives, summon mobs, visual before spikes and finally spikes.

--HG--
branch : trunk
2010-05-06 21:01:43 +02:00
Trazom62 03159c599a Fix Script Ahnkahet/Volazj.
- fix typo for insanity spell 3.
- reset phase mask of players when combat ends.
- remove heroic spell definition now in spelldifficulty_dbc.

--HG--
branch : trunk
2010-05-06 20:58:26 +02:00
Brian ec324f0d55 * Removed registration form that was not kept up to date.
* If you want to run a public server, write your own

--HG--
branch : trunk
2010-05-03 20:07:50 -06:00
Brian 889fbc5b0b * Renamed map extractor folder to something more fitting
--HG--
branch : trunk
rename : contrib/extractor/CMakeLists.txt => contrib/map_extractor/CMakeLists.txt
rename : contrib/extractor/README.linux => contrib/map_extractor/README.linux
rename : contrib/extractor/System.cpp => contrib/map_extractor/System.cpp
rename : contrib/extractor/VC90_AD.sln => contrib/map_extractor/VC90_AD.sln
rename : contrib/extractor/VC90_ad.vcproj => contrib/map_extractor/VC90_ad.vcproj
rename : contrib/extractor/ad => contrib/map_extractor/ad
rename : contrib/extractor/ad.exe => contrib/map_extractor/ad.exe
rename : contrib/extractor/adt.cpp => contrib/map_extractor/adt.cpp
rename : contrib/extractor/adt.h => contrib/map_extractor/adt.h
rename : contrib/extractor/dbcfile.cpp => contrib/map_extractor/dbcfile.cpp
rename : contrib/extractor/dbcfile.h => contrib/map_extractor/dbcfile.h
rename : contrib/extractor/debug/zlib.lib => contrib/map_extractor/debug/zlib.lib
rename : contrib/extractor/libmpq/CMakeLists.txt => contrib/map_extractor/libmpq/CMakeLists.txt
rename : contrib/extractor/libmpq/common.cpp => contrib/map_extractor/libmpq/common.cpp
rename : contrib/extractor/libmpq/common.h => contrib/map_extractor/libmpq/common.h
rename : contrib/extractor/libmpq/explode.cpp => contrib/map_extractor/libmpq/explode.cpp
rename : contrib/extractor/libmpq/explode.h => contrib/map_extractor/libmpq/explode.h
rename : contrib/extractor/libmpq/extract.cpp => contrib/map_extractor/libmpq/extract.cpp
rename : contrib/extractor/libmpq/huffman.cpp => contrib/map_extractor/libmpq/huffman.cpp
rename : contrib/extractor/libmpq/huffman.h => contrib/map_extractor/libmpq/huffman.h
rename : contrib/extractor/libmpq/mpq.cpp => contrib/map_extractor/libmpq/mpq.cpp
rename : contrib/extractor/libmpq/mpq.h => contrib/map_extractor/libmpq/mpq.h
rename : contrib/extractor/libmpq/parser.cpp => contrib/map_extractor/libmpq/parser.cpp
rename : contrib/extractor/libmpq/wave.cpp => contrib/map_extractor/libmpq/wave.cpp
rename : contrib/extractor/libmpq/wave.h => contrib/map_extractor/libmpq/wave.h
rename : contrib/extractor/libmpq/zconf.h => contrib/map_extractor/libmpq/zconf.h
rename : contrib/extractor/libmpq/zlib.h => contrib/map_extractor/libmpq/zlib.h
rename : contrib/extractor/loadlib/CMakeLists.txt => contrib/map_extractor/loadlib/CMakeLists.txt
rename : contrib/extractor/loadlib/adt.cpp => contrib/map_extractor/loadlib/adt.cpp
rename : contrib/extractor/loadlib/adt.h => contrib/map_extractor/loadlib/adt.h
rename : contrib/extractor/loadlib/loadlib.cpp => contrib/map_extractor/loadlib/loadlib.cpp
rename : contrib/extractor/loadlib/loadlib.h => contrib/map_extractor/loadlib/loadlib.h
rename : contrib/extractor/loadlib/wdt.cpp => contrib/map_extractor/loadlib/wdt.cpp
rename : contrib/extractor/loadlib/wdt.h => contrib/map_extractor/loadlib/wdt.h
rename : contrib/extractor/mpq_libmpq.cpp => contrib/map_extractor/mpq_libmpq.cpp
rename : contrib/extractor/mpq_libmpq.h => contrib/map_extractor/mpq_libmpq.h
rename : contrib/extractor/release/zlib.lib => contrib/map_extractor/release/zlib.lib
2010-05-03 20:06:29 -06:00
Brian 92bb163343 * Cleanup of old VS build files for the map extractor
--HG--
branch : trunk
2010-05-03 20:05:15 -06:00
Anubisss a5fc22895e Correctly allocate memory for script npc_crusade_recruit. Bug found by hunteee.
--HG--
branch : trunk
2010-05-06 14:58:45 +02:00
Rat b45e55fde9 small tweak for escortAI's debuglog
--HG--
branch : trunk
2010-05-06 11:46:13 +02:00
click cb84d3e617 Cleanup : Remove postgreSQL-support (not used and has also been broken for a long time)
--HG--
branch : trunk
2010-05-06 09:53:09 +02:00
click 38061a6fa6 Remove a double transaction-start (creating a nested transaction = bad)
--HG--
branch : trunk
2010-05-06 00:35:09 +02:00