Commit Graph

38 Commits

Author SHA1 Message Date
Trazom62
1acb837a33 Fix crash in CreatureGroup::MemberAttackStart.
Fixes issue #1982.

--HG--
branch : trunk
2010-05-05 13:58:25 +02:00
Spp
1bc2a9fd4a Replace some PQuery/PExecute by more simple Query/Execute
Original patch by hunuza, extended to whole code
Closses issue 1446

--HG--
branch : trunk
2010-04-30 11:21:25 +02:00
Spp
49d05ba9aa Code style (game + scripts only):
"( " --> "("
" )" --> ")"

--HG--
branch : trunk
2010-04-07 22:59:46 +02:00
Spp
d19e127080 Code style (game + scripts only):
"if(" --> "if ("

--HG--
branch : trunk
2010-04-07 19:14:10 +02:00
Spp
2e127f7a30 Code style (game + scripts only):
"while(" --> "while ("

--HG--
branch : trunk
2010-04-07 19:13:19 +02:00
Anubisss
d9cb070215 Implement QueryResult_AutoPtr type which is ACE's reference counted auto_ptr(ACE_Refcounted_Auto_Ptr) for QueryResult pointers.
Use this auto_ptr for every DB queries(except QueryNamedResult yet).

This patch guarantees NO memory leaks from QueryResult pointers.

Thanks to raczman for the idea and for the helping to make this patch.

--HG--
branch : trunk
2010-01-23 14:45:58 +01:00
n0n4m3
99f66a6bc9 Updated copyright for new year.
--HG--
branch : trunk
2010-01-16 20:19:18 +03:00
Anubisss
d7fd577cf4 Fix again memory leaks in CreatureGroupManager::LoadCreatureFormations()
my log:

==28921== 112 bytes in 7 blocks are definitely lost in loss record 8 of 67
==28921==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)
==28921==    by 0x8A6043: CreatureGroupManager::LoadCreatureFormations() (CreatureGroups.cpp:111)
==28921==    by 0xC00E91: World::SetInitialWorldSettings() (World.cpp:1553)
==28921==    by 0x808D56: Master::Run() (Master.cpp:235)
==28921==    by 0x808215: main (Main.cpp:154)

--HG--
branch : trunk
2010-01-16 01:55:45 +01:00
Anubisss
a23e26526b Fix 2 mem leakz.
I pasted my log if you don't mind:

==26756== 563,120 bytes in 70 blocks are possibly lost in loss record 263 of 282
==26756==    at 0x4C268AE: malloc (vg_replace_malloc.c:207)
==26756==    by 0x5823DD1: my_malloc (in /usr/lib/libmysqlclient_r.so.15.0.0)
==26756==    by 0x58272C4: alloc_root (in /usr/lib/libmysqlclient_r.so.15.0.0)
==26756==    by 0x584B94E: cli_read_rows (in /usr/lib/libmysqlclient_r.so.15.0.0)
==26756==    by 0x58499CD: mysql_store_result (in /usr/lib/libmysqlclient_r.so.15.0.0)
==26756==    by 0xCF6EB6: DatabaseMysql::_Query(char const*, st_mysql_res**, st_mysql_field**, unsigned long*, unsigned int*) (DatabaseMysql.cpp:219)
==26756==    by 0xCF72CB: DatabaseMysql::Query(char const*) (DatabaseMysql.cpp:245)
==26756==    by 0xCF4CEE: Database::PQuery(char const*, ...) (Database.cpp:136)
==26756==    by 0x8A6160: CreatureGroupManager::LoadCreatureFormations() (CreatureGroups.cpp:136)
==26756==    by 0xC00E3D: World::SetInitialWorldSettings() (World.cpp:1553)
==26756==    by 0x808D56: Master::Run() (Master.cpp:235)
==26756==    by 0x808215: main (Main.cpp:154)

--HG--
branch : trunk
2010-01-16 01:27:26 +01:00
maximius
3f338cc1c3 *Massive cleanup redux.
--HG--
branch : trunk
2009-10-17 16:20:24 -07:00
maximius
e585187b24 *Backed out changeset 3be01fb200a5
--HG--
branch : trunk
2009-10-17 15:51:44 -07:00
maximius
26b5e033ff *Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget

--HG--
branch : trunk
2009-10-17 15:35:07 -07:00
Kudlaty
b287288888 Fix compatibility problems with PostgreSQL. Patch by Azuritus
--HG--
branch : trunk
2009-09-10 22:40:40 +02:00
maximius
0d8ea7cd97 *Some GUID cleanup, don't want any Linux crashes ;) (thanks Zor)
--HG--
branch : trunk
2009-09-09 10:30:14 -07:00
megamage
d2bb53dccd *Set creature group leader following dist and angle to be zero to make it safer.
--HG--
branch : trunk
2009-05-31 21:16:32 -05:00
megamage
5f023f64f3 *Use degree rather than radian for creature_formation table.
--HG--
branch : trunk
2009-05-17 17:29:25 -05:00
megamage
0ce060ddd7 *Make CreatureGroupHolder map-based to prevent crash when using multi-thread map.
--HG--
branch : trunk
2009-04-10 12:46:40 -05:00
TrullyONE
d6be48326f Added missing z-value in Formations.
--HG--
branch : trunk
2009-04-09 01:01:57 +03:00
megamage
f59c4debf6 [7622] Added creatureAI with related database tables. Author: AlexDereka
*Note: three tables are renamed.

--HG--
branch : trunk
2009-04-07 19:38:09 -05:00
XTZGZoReX
cea63f6fc6 * Re-implement creature_formations startup checks after formations update.
--HG--
branch : trunk
2009-04-07 18:10:47 +02:00
XTZGZoReX
2fe9fed7c7 * Tabs to spaces -- using: perl -p -i -e "s/\t/ /g" *
--HG--
branch : trunk
2009-04-07 10:51:45 +02:00
megamage
ac4edf0e09 *Update creature formation code.
--HG--
branch : trunk
2009-04-06 20:33:52 -05:00
megamage
e8866340ce *CreatureGroups fixed and improoved. By TrullyONE
- Multimap support for instances added.
 - Removed redundant group checks.
 - New movement rules (bool group formed/dismissed added).
 - uint32 Creature::GroupID replaced with CreatureGroup pointer.

--HG--
branch : trunk
2009-04-06 13:27:42 -05:00
XTZGZoReX
0f61bac93d * Do proper checks at startup for creature_formations table. Also remove useless lastLeaderGUID variable.
--HG--
branch : trunk
2009-04-05 18:56:10 +02:00
megamage
cb8b3fe5db [7607] Improvements in support some generic achievement classes Author: VladimirMangos
* Implement support achievements with refAchievement field != 0, that have criterias stored in achievement refAchievement.
    * Implement support achievement complete req. with specific count of completed critirias.
    * Avoid full achievement list scan at search achievement associated with criteria.

--HG--
branch : trunk
2009-04-03 16:36:20 -06:00
XTZGZoReX
9fe43fa9c0 * Implementing database logging:
** LogTime and LogColors config options removed due to incompatibility.
** Old file logging still available.
** Totally redone the Log class.
** Config options added: EnableLogDB, DBLogLevel, LogDB.Char, LogDB.RA, LogDB.GM -- remember to update config file.
** SQL updates attached.

--HG--
branch : trunk
2009-03-19 21:13:52 +01:00
Blaymoira
0914744258 *Fixed creature following in dungeons
--HG--
branch : trunk
2009-03-14 11:21:25 +01:00
megamage
31637d4aac *Merge.
--HG--
branch : trunk
2009-02-18 11:36:19 -06:00
KingPin
14234c86fa Newline added to bottom of all files.
--HG--
branch : trunk
2009-02-17 20:07:49 -06:00
megamage
6aee5fcbe7 *Merge.
--HG--
branch : trunk
2009-02-12 17:09:15 -06:00
Paradox
d230302b16 Replace tabs with spaces in more files.
--HG--
branch : trunk
2009-02-09 08:16:34 -05:00
megamage
4d008f2043 Replace tabs with spaces, and fix crlf issues
--HG--
branch : trunk
2009-02-04 10:33:18 -06:00
megamage
d69198732e *Merge.
--HG--
branch : trunk
2009-02-04 17:22:43 -06:00
Drahy
5dab980495 * Updated copyright notice for new year (2009) part 2
* Changed mangos website

--HG--
branch : trunk
2009-02-04 12:42:26 +01:00
Drahy
7c19c420c6 * Updated copyright notice for new year (2009) part 1 - Mercurial cant convert all files at once
--HG--
branch : trunk
2009-02-04 12:04:12 +01:00
megamage
f56e3beb43 *Add a missing sql in 725. By Machiavelli.
--HG--
branch : trunk
2008-12-31 11:33:25 -06:00
shadowu@mail.bg
32a9420289 *Small typo fixes. After this update leader's GUIDS in CreatureGroups must be added also as group member GUIDS.
--HG--
branch : trunk
2008-12-17 20:30:36 +02:00
shadowu@mail.bg
9948e98703 *Creature formations implemented.
--HG--
branch : trunk
2008-12-15 00:07:21 +02:00