Commit Graph

19778 Commits

Author SHA1 Message Date
Baeumchen
3ffbd27cdd Update wrong Escape state
Found by w5860363 : http://www.trinitycore.org/f/topic/9112-halls-of-reflectioncpp-question%EF%BC%9F/
2013-10-02 19:08:14 +02:00
Shauren
993513ce8d Core/Vehicles: Fixed a crash happening when a minion vehicle despawns with passenger on it
Ref #9738
2013-10-02 00:13:00 +02:00
Sebastian Valle
8fb1f7cc97 Tools/MeshExtractor: Implemented 7ca6f56a06 in MeshExtractor and fixed a memory leak. 2013-10-01 16:27:57 -05:00
Sebastian Valle
a8611de906 Tools/MeshExtractor: Fixed a few mistakes in MPQManager::GetFileFrom and Utils::SaveToDisk 2013-10-01 15:45:55 -05:00
Shauren
770f69d4e6 Core/Vehicles: Fixed calling Vehicle::Uninstall on freed memory
Valgrind log:
    ==7723== Invalid read of size 8
    ==7723==    at 0x10753CE: Vehicle::GetBase() const (Vehicle.h:51)
    ==7723==    by 0x1072449: Vehicle::Uninstall() (Vehicle.cpp:159)
    ==7723==    by 0x10B1E3C: Unit::RemoveVehicleKit() (Unit.cpp:15946)
    ==7723==    by 0x10A8F32: Unit::RemoveFromWorld() (Unit.cpp:13441)
    ==7723==    by 0x11A4703: Creature::RemoveFromWorld() (Creature.cpp:203)
    ==7723==    by 0x11B9AB7: TempSummon::RemoveFromWorld() (TemporarySummon.cpp:279)
    ==7723==    by 0x11B9C6C: Minion::RemoveFromWorld() (TemporarySummon.cpp:308)
    ==7723==    by 0x10A917C: Unit::CleanupBeforeRemoveFromMap(bool) (Unit.cpp:13482)
    ==7723==    by 0x10A926C: Unit::CleanupsBeforeDelete(bool) (Unit.cpp:13504)
    ==7723==    by 0x12DBB89: Map::AddObjectToRemoveList(WorldObject*) (Map.cpp:2108)
    ==7723==    by 0x10F4556: WorldObject::AddObjectToRemoveList() (Object.cpp:2140)
    ==7723==    by 0x11B99C5: TempSummon::UnSummon(unsigned int) (TemporarySummon.cpp:256)
    ==7723==  Address 0x3bd20530 is 64 bytes inside a block of size 168 free'd
    ==7723==    at 0x4C2B59C: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==7723==    by 0x1071FD3: Vehicle::~Vehicle() (Vehicle.cpp:66)
    ==7723==    by 0x10B1E71: Unit::RemoveVehicleKit() (Unit.cpp:15947)
    ==7723==    by 0x10A8F32: Unit::RemoveFromWorld() (Unit.cpp:13441)
    ==7723==    by 0x11A4703: Creature::RemoveFromWorld() (Creature.cpp:203)
    ==7723==    by 0x11B9AB7: TempSummon::RemoveFromWorld() (TemporarySummon.cpp:279)
    ==7723==    by 0x11B9C6C: Minion::RemoveFromWorld() (TemporarySummon.cpp:308)
    ==7723==    by 0x10A917C: Unit::CleanupBeforeRemoveFromMap(bool) (Unit.cpp:13482)
    ==7723==    by 0x10A926C: Unit::CleanupsBeforeDelete(bool) (Unit.cpp:13504)
    ==7723==    by 0x12DBB89: Map::AddObjectToRemoveList(WorldObject*) (Map.cpp:2108)
    ==7723==    by 0x10F4556: WorldObject::AddObjectToRemoveList() (Object.cpp:2140)
    ==7723==    by 0x11B99C5: TempSummon::UnSummon(unsigned int) (TemporarySummon.cpp:256)
2013-10-01 22:06:39 +02:00
Filip
8aa92ea252 Are we there, yeti?
By @dr-j fixes #10972
2013-10-01 21:41:40 +02:00
Sebastian Valle
1588e27f1e Tools/MeshExtractor: Fixed the generated mesh for continents.
Fixed a few more issues.
2013-10-01 14:13:37 -05:00
Aokromes
586df8d417 Merge pull request #10978 from NightQuest/string_concatenation
C++11 string literal concatenation
2013-10-01 03:13:03 -07:00
Ellie
c803cc1f5c Merge branch 'master' of github.com:TrinityCore/TrinityCore into string_concatenation 2013-10-01 01:14:32 -07:00
Ellie
1fae858645 Whitespace between string literals and user-defined literals is now mandatory for concatenation in C++11 2013-10-01 01:13:13 -07:00
Discover-
11d9a44508 Core/SAI: Properly implement the second parameter of SMART_ACTION_CALL_TIMED_ACTIONLIST to reflect the wiki (which also makes more sense) 2013-10-01 10:08:05 +02:00
Sebastian Valle
c5c3b7ab2a Tools/MeshExtractor: Implemented the code to generate mesh files for continent maps.
Fixed a few more things
ToDo:
Test the generated navmesh.
2013-09-30 23:31:09 -05:00
Sebastian Valle
3ed0a11679 Tools/MeshExtractor: Do not delete the polygons before we are done using them. 2013-09-30 21:08:33 -05:00
Sebastian Valle
1e23710b11 Tools/MeshExtractor: Forgot to push some changes. 2013-09-30 18:00:00 -05:00
Sebastian Valle
520ff5a6e7 Tools/MeshExtractor: Some more cleanup. 2013-09-30 17:46:19 -05:00
Sebastian Valle
271a57b80d Tools/MeshExtractor: Fixed mmap extracting for instance maps and fixed a number of issues.
ToDo:
Cleanup the code a bit.
WILL NOT CURRENTLY WORK WITH TrinityCore, if you want to test it, use the --extract 32 flag of MeshExtractor.
2013-09-30 17:27:37 -05:00
Filip
1010e140bf DB/Update: Return To...RP event update
By @Foldor fixes #10886
2013-09-30 22:52:14 +02:00
Spp
0c0ff98344 Core/RBAC: Fix errors in RBAC sql related to ea2fe0217d 2013-09-30 11:55:51 +02:00
FireEmerald
5c95431df2 DB/SAI: Correction on waypoints for quest npc.
Closes #10937
2013-09-30 11:30:58 +02:00
zxbiohazardzx
6e9584696c DB/Loot: correct petdrops from the fishingbags and cleanup the misused reference
Closes #10975
2013-09-30 11:27:13 +02:00
dr-j
7a234c83f4 DB/Loot: Fix Satchel of Helpful Goods
Closes #10552
Closes #10292
2013-09-30 11:03:36 +02:00
Discover-
80ce30ac7d Core/SAI: Add 'playerOnly' parameters to SMART_TARGET_CLOSEST_ENEMY and SMART_TARGET_CLOSEST_FRIENDLY. Wiki is updated accordingly. 2013-09-30 10:11:02 +02:00
Sebastian Valle
15e7f7ab21 Tools/MeshExtractor: Implemented mmap mesh generation for instances (They do not have ADT files, they're just a big WMO).
Cleaned up some things and fixed some errors.
ToDo:
* Test this a bit more.
* Cleanup the codebase for this, remove duplicated code.
2013-09-30 01:05:07 -05:00
Sebastian Valle
9876108f3e Tools/MeshExtractor: Removed some redundant code 2013-09-29 20:15:35 -05:00
Sebastian Valle
02a543b0a0 Tools/MeshExtractor: Some more cleanup and memory management improvements. 2013-09-29 20:06:44 -05:00
Sebastian Valle
371dd07037 Tools/MeshExtractor: Fixed Doodads and WMOs in the terrain.
Cleaned up a little.
2013-09-29 19:47:52 -05:00
Sebastian Valle
279183737c Tools/MeshExtractor: Fixed(??????) Doodads in the terrain.
Semi-fixed WMOs in the terrain, they are wrongly rotated.
P.D: HALP
P.P.D: Entered "I don't know what i'm doing" mode.
2013-09-29 16:52:20 -05:00
Filip
79ad89a3a7 DB/SAI: Destroying the Alters
By @untaught fixes #10841
2013-09-29 22:43:44 +02:00
Filip
dbd994b047 DB/SAI: Hampering their Escape
By @untaught fixes #10780
2013-09-29 22:43:39 +02:00
Filip
9bd7cc8a8b DB/Update: Plan B
By @untaught fixes #10787
2013-09-29 22:43:35 +02:00
Filip
ff8bc029ce DB/Update: Gibblewilt fear spam
By @Vincent-Michael fixes #10627
2013-09-29 22:28:45 +02:00
Filip
9842cbf887 DB/SAI: Finding the Source
By @dr-j fixes #10943
2013-09-29 22:24:56 +02:00
Filip
728b2555b6 DB/SAI: Neltharion's Flame (12267)
By @dr-j fixes #10965
2013-09-29 22:19:44 +02:00
Filip
c67d52730b DB/SAI: Leading the Ancestors Home
By @dr-j fixes #10783
2013-09-29 22:16:13 +02:00
Spp
ad29676c27 Fix compile under linux and update auth db with latest changes 2013-09-29 14:15:58 +02:00
Spp
ea2fe0217d Core/RBAC: Simplify RBAC implementation
- Drop groups (roles than can have inherited roles) and roles (set of
  permissions)
- Permissions can now have inherited permissions (those act as roles)

RBAC DB structure is now limited to four tables
- rbac_permissions: Contains permissions and roles
- rbac_linked_permissions: Contains the relation between permissions and
  linked permissions (those permissions that have linked permissions are
  called roles)
- rbac_default_permissions: Contains the list of permissions to be granted
  to each security level [Added to maintain compatibility in an easy way]
- rbac_account_permissions: Contains the list of permissions granted or
  denied for a particular account.

NOTE: IF YOU ARE USING CUSTOM PERMISSIONS, ROLES OR GROUPS CHECK THE SQL
BEFORE APPLYING...
2013-09-29 13:19:05 +02:00
jackpoz
a1fa7bf525 Tools/VMAP Extractor: Fix memory issues
Fix not-NULL terminated char buffer and uninitialized memory written to vmaps due to WMOLiquidHeader struct padding bytes left uninitialized. The padding bytes should be ignored anyway by VMAP Assembler so no re-extraction is required.

Valgrind log:
 Syscall param write(buf) points to uninitialised byte(s)
  at 0x585FB50: __write_nocancel (syscall-template.S:81)
  by 0x57EE2F2: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1270)
  by 0x57EE1D1: new_do_write (fileops.c:546)
  by 0x57EF904: _IO_do_write@@GLIBC_2.2.5 (fileops.c:519)
  by 0x57EEB70: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1341)
  by 0x57E3EC4: fwrite (iofwrite.c:43)
  by 0x41161B: WMOGroup::ConvertToVMAPGroupWmo(_IO_FILE*, WMORoot*, bool) (wmo.cpp:386)
  by 0x407FA9: ExtractSingleWmo(std::string&) (vmapexport.cpp:215)
  by 0x407B16: ExtractWmo() (vmapexport.cpp:138)
  by 0x409D50: main (vmapexport.cpp:497)
 Address 0x40398e2 is not stack'd, malloc'd or (recently) free'd
 Uninitialised value was created by a heap allocation
  at 0x4C2C7A7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0x410ADA: WMOGroup::open() (wmo.cpp:224)
  by 0x407F54: ExtractSingleWmo(std::string&) (vmapexport.cpp:208)
  by 0x407B16: ExtractWmo() (vmapexport.cpp:138)
  by 0x409D50: main (vmapexport.cpp:497)
2013-09-29 12:26:56 +02:00
Sebastian Valle
a68c29e15c Tools/MeshExtractor: Fixed a lot of stuff, finally made the Doodads render, the WMO's have been disabled for now.
ToDo:
* Fix the doodads positions.
* Review and re-implement some code.

P.D: Help me please.
2013-09-29 02:05:28 -05:00
jackpoz
7ca6f56a06 Tools/MapExtractor: Fix string-related memory issues
Fix not-NULL terminated char buffers and char[] to string conversion.

Valgrind logs:
 Invalid read of size 1
  at 0x4C2D7D4: __GI_strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0x5318BAF: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
  by 0x409471: ReadBuild(int) (System.cpp:189)
  by 0x40CEC6: main (System.cpp:1108)
  Address 0x5f851ee is 0 bytes after a block of size 94 alloc'd
  at 0x4C2C037: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0x40F63A: MPQFile::MPQFile(char const*) (mpq_libmpq.cpp:65)
  by 0x409408: ReadBuild(int) (System.cpp:182)
  by 0x40CEC6: main (System.cpp:1108)

 Invalid read of size 1
  at 0x57FFCAC: strtok (strtok.S:165)
  by 0x40D279: MPQArchive::GetFileListTo(std::vector<std::string, std::allocator<std::string> >&) (mpq_libmpq04.h:45)
  by 0x40C5CF: ExtractDBCFiles(int, bool) (System.cpp:1001)
  by 0x40CEF5: main (System.cpp:1110)
  Address 0x5f91e27 is 0 bytes after a block of size 44,391 alloc'd
  at 0x4C2C037: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0x40D1A5: MPQArchive::GetFileListTo(std::vector<std::string, std::allocator<std::string> >&) (mpq_libmpq04.h:30)
  by 0x40C5CF: ExtractDBCFiles(int, bool) (System.cpp:1001)
  by 0x40CEF5: main (System.cpp:1110)
2013-09-28 23:52:55 +02:00
jackpoz
ac5b6f337e Core/Scripts: Fix uninitialized values in The Black Morass
Valgrind log:
 Conditional jump or move depends on uninitialised value(s)
  at 0x1798C2C: npc_medivh_bm::npc_medivh_bmAI::UpdateAI(unsigned int) (the_black_morass.cpp:192)
  by 0x11AEFC0: Creature::Update(unsigned int) (Creature.cpp:542)
  by 0x12E96F8: Trinity::ObjectUpdater::Visit(GridRefManager<Creature>&) (GridNotifiersImpl.h:45)

 Conditional jump or move depends on uninitialised value(s)
  at 0x1798C7E: npc_medivh_bm::npc_medivh_bmAI::UpdateAI(unsigned int) (the_black_morass.cpp:200)
  by 0x11AEFC0: Creature::Update(unsigned int) (Creature.cpp:542)
  by 0x12E96F8: Trinity::ObjectUpdater::Visit(GridRefManager<Creature>&) (GridNotifiersImpl.h:45)

 Conditional jump or move depends on uninitialised value(s)
  at 0x1798CB0: npc_medivh_bm::npc_medivh_bmAI::UpdateAI(unsigned int) (the_black_morass.cpp:205)
  by 0x11AEFC0: Creature::Update(unsigned int) (Creature.cpp:542)
  by 0x12E96F8: Trinity::ObjectUpdater::Visit(GridRefManager<Creature>&) (GridNotifiersImpl.h:45)

 Conditional jump or move depends on uninitialised value(s)
  at 0x1798CE2: npc_medivh_bm::npc_medivh_bmAI::UpdateAI(unsigned int) (the_black_morass.cpp:210)
  by 0x11AEFC0: Creature::Update(unsigned int) (Creature.cpp:542)
  by 0x12E96F8: Trinity::ObjectUpdater::Visit(GridRefManager<Creature>&) (GridNotifiersImpl.h:45)
2013-09-28 22:18:19 +02:00
Subv
2b97ffafe9 Merge pull request #10966 from Chaplain/Mesh
Tools/MeshExtractor: Cleanup using static analyzing tool
2013-09-28 12:21:25 -07:00
Filip
6711ba0bd8 DB/Update: Pet spells 2013-09-28 18:19:33 +02:00
Filip
18bf68ad7e DB/Update: Spawndist for creature with random movement 2013-09-28 18:15:16 +02:00
Chaplain
42ae39bf97 Tools/MeshExtractor: Cleanup using static analyzing tool
*printf format fixed
*method arguments changed to const where needed
*removed not needed strlen() from cycles
*other minor changes
2013-09-28 15:47:23 +03:00
Subv
cde2e4d6c9 Merge pull request #10963 from Tomatodev/master
Tools/MeshExtractor: Fixed an infinite loop when reading the liquid information
2013-09-27 18:27:10 -07:00
Tomatoes
58348d0362 Subv's changes to mesh extractor V2
Signed-off-by: Tomatoes <diredarknil@gmail.com>
2013-09-27 18:04:14 -07:00
Sebastian Valle
85d6b7b7b3 Tools/MeshExtractor: Added some debug messages. 2013-09-27 16:42:00 -05:00
Sebastian Valle
b7b870be82 Tools/MeshExtractor: Removed the fool-proof code. 2013-09-27 16:01:28 -05:00
click
64f1324725 Fix silly " that snuck in. 2013-09-27 22:48:29 +02:00
click
33fcd36c7b Buildsystem/CMake: Add support for building meshextractor-project from CMake GUI 2013-09-27 22:12:53 +02:00