Commit Graph

17844 Commits

Author SHA1 Message Date
Ascathor
2607738990 Core/Code: Unify codestyle for brackets: {} to { }.
Also added missing copyright to some files.
2013-10-27 23:46:02 +01:00
Shauren
cf72f7cc5c Core/Vehicles: Fixed a crash caused by accessing freed memory
Valgrind log:
==1357== Invalid read of size 8
==1357== at 0x108339C: std::_Rb_tree<signed char, std::pair<signed char const, VehicleSeat>, std::_Select1st<std::pair<signed char const, VehicleSeat> >, std::less<signed char>, std::allocator<std::pair<signed char const, VehicleSeat> > >::begin() (stl_tree.h:685)
==1357== by 0x1082B23: std::map<signed char, VehicleSeat, std::less<signed char>, std::allocator<std::pair<signed char const, VehicleSeat> > >::begin() (stl_map.h:321)
==1357== by 0x1567152: VehicleAI::CheckConditions(unsigned int) (CombatAI.cpp:330)
==1357== by 0x1566EE5: VehicleAI::UpdateAI(unsigned int) (CombatAI.cpp:285)
==1357== by 0x11A8FB3: Creature::Update(unsigned int) (Creature.cpp:543)
==1357== by 0x11BC1A2: TempSummon::Update(unsigned int) (TemporarySummon.cpp:47)
==1357== by 0x12E8194: Trinity::ObjectUpdater::Visit(GridRefManager<Creature>&) (GridNotifiersImpl.h:45)
==1357== by 0x12F31BD: void VisitorHelper<Trinity::ObjectUpdater, Creature>(Trinity::ObjectUpdater&, ContainerMapList<Creature>&) (TypeContainerVisitor.h:64)
==1357== by 0x12F2CCB: void VisitorHelper<Trinity::ObjectUpdater, Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > >(Trinity::ObjectUpdater&, ContainerMapList<TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > >&) (TypeContainerVisitor.h:70)
==1357== by 0x12F251F: void VisitorHelper<Trinity::ObjectUpdater, GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > >(Trinity::ObjectUpdater&, ContainerMapList<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >&) (TypeContainerVisitor.h:71)
==1357== by 0x12F1BA5: void VisitorHelper<Trinity::ObjectUpdater, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >(Trinity::ObjectUpdater&, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >&) (TypeContainerVisitor.h:94)
==1357== by 0x12F0DDD: TypeContainerVisitor<Trinity::ObjectUpdater, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >::Visit(TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >&) (TypeContainerVisitor.h:105)
==1357== by 0x12EF5A0: void Grid<Player, TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeList<DynamicObject, TypeNull> > > >, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >::Visit<Trinity::ObjectUpdater>(TypeContainerVisitor<Trinity::ObjectUpdater, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >&) (Grid.h:91)
==1357== by 0x12ED766: void NGrid<8u, Player, TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeList<DynamicObject, TypeNull> > > >, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >::VisitGrid<Trinity::ObjectUpdater, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >(unsigned int, unsigned int, TypeContainerVisitor<Trinity::ObjectUpdater, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >&) (NGrid.h:157)
==1357== by 0x12EA2D3: void Map::Visit<Trinity::ObjectUpdater, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >(Cell const&, TypeContainerVisitor<Trinity::ObjectUpdater, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >&) (Map.h:701)
==1357== by 0x12DCD84: Map::VisitNearbyCellsOf(WorldObject*, TypeContainerVisitor<Trinity::ObjectUpdater, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >&, TypeContainerVisitor<Trinity::ObjectUpdater, TypeMapContainer<TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeList<DynamicObject, TypeNull> > > > > >&) (Map.cpp:604)
==1357== by 0x12DD045: Map::Update(unsigned int) (Map.cpp:646)
==1357== by 0x1520E03: MapUpdateRequest::call() (MapUpdater.cpp:54)
==1357== by 0x1596958: DelayExecutor::svc() (DelayExecutor.cpp:52)
==1357== by 0x5184E56: ACE_Task_Base::svc_run(void*) (in /usr/lib/libACE-6.0.3.so)
==1357== Address 0x2a849600 is 32 bytes inside a block of size 168 free'd
==1357== at 0x4C2BADC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1357== by 0x107F309: Vehicle::~Vehicle() (Vehicle.cpp:66)
==1357== by 0x10BE0D2: Unit::RemoveVehicleKit() (Unit.cpp:15949)
==1357== by 0x10B52CA: Unit::RemoveFromWorld() (Unit.cpp:13440)
==1357== by 0x11A7D73: Creature::RemoveFromWorld() (Creature.cpp:204)
==1357== by 0x11BCBAA: TempSummon::RemoveFromWorld() (TemporarySummon.cpp:279)
==1357== by 0x11BCD5E: Minion::RemoveFromWorld() (TemporarySummon.cpp:308)
==1357== by 0x10B5514: Unit::CleanupBeforeRemoveFromMap(bool) (Unit.cpp:13481)
==1357== by 0x10B5605: Unit::CleanupsBeforeDelete(bool) (Unit.cpp:13503)
==1357== by 0x12E3B67: Map::AddObjectToRemoveList(WorldObject*) (Map.cpp:2401)
==1357== by 0x10FCAAC: WorldObject::AddObjectToRemoveList() (Object.cpp:2138)
==1357== by 0x11BCABA: TempSummon::UnSummon(unsigned int) (TemporarySummon.cpp:256)
==1357== by 0x11BCAFA: ForcedUnsummonDelayEvent::Execute(unsigned long, unsigned int) (TemporarySummon.cpp:261)
==1357== by 0x159B665: EventProcessor::Update(unsigned int) (EventProcessor.cpp:47)
==1357== by 0x10858E2: Unit::Update(unsigned int) (Unit.cpp:318)
==1357== by 0x11A8E6C: Creature::Update(unsigned int) (Creature.cpp:519)
==1357== by 0x11BC1A2: TempSummon::Update(unsigned int) (TemporarySummon.cpp:47)
==1357== by 0x12E8194: Trinity::ObjectUpdater::Visit(GridRefManager<Creature>&) (GridNotifiersImpl.h:45)
==1357== by 0x12F31BD: void VisitorHelper<Trinity::ObjectUpdater, Creature>(Trinity::ObjectUpdater&, ContainerMapList<Creature>&) (TypeContainerVisitor.h:64)
==1357== by 0x12F2CCB: void VisitorHelper<Trinity::ObjectUpdater, Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > >(Trinity::ObjectUpdater&, ContainerMapList<TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > >&) (TypeContainerVisitor
2013-10-27 23:05:31 +01:00
Ascathor
e5553cfb78 Core/Command: Fix ban info order for .pinfo 2013-10-27 20:38:33 +01:00
Shauren
f0794d7585 Core/Transports: Correct path generation for a few transports 2013-10-27 11:15:56 +01:00
Shauren
b81bf7d025 Core/Spells: Implemented additional conditions for spells that start cooldown after an event instead of after cast 2013-10-26 14:39:00 +02:00
jackpoz
daf5a4b5c3 Core/Chat Commands: Allow to add overlapping teles .
Allow to add overlapping teles like "abc" even if "abcde" already exists. This wasn't possible and a "Teleport already exists" error was thrown instead.
2013-10-25 21:50:52 +02:00
AliveShiro
cc89ac0be3 Game/Battlefield:
- Remove double definition of one NPC
- Use definition instead a "magic number"
2013-10-25 17:30:24 +02:00
Shauren
f93ac805fd Core/Transports: Fixed double deleting IoC transports 2013-10-25 12:37:48 +02:00
jackpoz
cdcee93854 Core/IoC: Fix uninitialized timer
Fix uninitialized Docks timer in Isle Of Conquest .

Valgrind log:
 Conditional jump or move depends on uninitialised value(s)
  at : BattlegroundIC::HandleCapturedNodes(ICNodePoint*, bool) (BattlegroundIC.cpp:665)
  by : BattlegroundIC::PostUpdateImpl(unsigned int) (BattlegroundIC.cpp:228)
  by : Battleground::Update(unsigned int) (Battleground.cpp:300)
  by : BattlegroundMgr::Update(unsigned int) (BattlegroundMgr.cpp:93)
  by : World::Update(unsigned int) (World.cpp:2062)
2013-10-22 22:59:47 +02:00
Vincent_Michael
9802c7b891 Scripts/Misc: Coding Style unification? (by Aokromes) 2013-10-22 20:24:05 +02:00
Gacko
0f92d513f8 Merge pull request #11092 from gerripeach/pull_request
Core: add missing comment
2013-10-22 11:14:10 -07:00
gerripeach
d745e32f1c Core: add missing comment 2013-10-22 17:24:59 +02:00
Shauren
06f5011071 Core/Auras: Added serverside checking for UNIT_FLAG_PACIFIED when attempting to start melee attack
Closes #8623
2013-10-22 17:09:41 +02:00
Shauren
3e12fe84c8 Core/Transports: Fixed players taking fall damage when teleporting from transports
Closes #11076
2013-10-22 17:02:01 +02:00
Discover-
0cc32e28e3 Core/SAI: Rename SMART_EVENT_TARGET_CASTING to SMART_EVENT_VICTIM_CASTING as that's what it actually does. It was often confused to use the target_type field instead of the victim. 2013-10-22 15:59:32 +02:00
jackpoz
fc947e2508 Core/Quest: Remove assertion
Remove assertion about Quest ExclusiveGroup since they are triggered even when adding valid quests to npcs. Fixes #8336 .
How to reproduce steps:
- .gm off
- add quest 11335 in creature_queststarter
- .reload creature_queststarter
- get in range of that creature
- .gm on
- assertion triggered
2013-10-21 23:41:31 +02:00
Subv
4123468f72 Merge pull request #11050 from Ascathor/master
Core/Command: Improve .group list to feature several notes and features ...
2013-10-21 05:28:35 -07:00
Discover-
1a6157985c Core/Misc: Get rid of some useless code 2013-10-21 09:15:17 +02:00
Shauren
b6db622b52 Core/Transports: Fixed crashes happening when passenger is removed from transport during teleport
Closes #11067
2013-10-20 14:27:17 +02:00
gerripeach
f8b1b264d1 Core/Spells: Fixed diminishing returns on creatures with CREATURE_FLAG_EXTRA_ALL_DIMINISH
Closes #11073
2013-10-20 12:47:54 +02:00
Shauren
dd9ea285ae Merge pull request #11072 from gerripeach/diminishing_returns2
Core/Spell: Earthbind totem should not have DR (Diminishing Returns)
2013-10-20 03:40:36 -07:00
gerripeach
cb89a42946 Core/Spell: Earthbind totem should not have DR (Diminishing Returns)
closes: #7037
2013-10-20 12:30:22 +02:00
gerripeach
93dbf20513 Core/Group: Fix crash in "Group::GetMembersCount"
closes: #9350
2013-10-20 06:26:29 +02:00
gerripeach
7223adb0a0 Core/Pet: Allow all pets to swim
closes: #9331
2013-10-20 06:17:11 +02:00
Machiavelli
b845e6af2b Merge pull request #10989 from Elron103/pullrequests2
Core/Tickets: Fix crash in TicketMgr::ResetTickets()
2013-10-19 09:31:47 -07:00
Vincent_Michael
5915a220a5 Misc: Removed some whitespace 2013-10-19 03:39:58 +02:00
Shauren
5259539a5f Core/Transports: Fixed crashes when instance with transports unloads
Closes #11056
2013-10-18 21:17:58 +02:00
Shauren
e21eef5c4a Core/Transports: Added missing include 2013-10-18 20:16:27 +02:00
Shauren
38b682d7a8 Core/Maps: Added gameobject case for AddObjectToSwitchList and fixed logic in RemoveAllObjectsInRemoveList 2013-10-18 20:12:36 +02:00
Vincent_Michael
77013aa081 Core: Fix warnings 2013-10-18 13:31:09 +02:00
Vincent_Michael
47741f4fa6 Core/Object: Added more information for MovePosition log 2013-10-18 12:36:54 +02:00
Vincent_Michael
94161a8341 Core/Creature: Added log/change back to default speed for speed walk / run = 0 (Speed is never zero) 2013-10-18 12:35:11 +02:00
Vincent_Michael
ddada2d182 Scripted/ScarletMonastery: Fix crash for headless horseman 2013-10-18 12:25:50 +02:00
jackpoz
4aee86627e Core/WorldSession: Mitigate DoS attacks
Mitigate DoS attacks like one explained in #10555 by processing a limited number of packets at each WorldSession::Update() call, allowing other WorldSessions to be processed.
100 packets in a single update sound like a reasonable amount.
2013-10-17 22:03:51 +02:00
Ascathor
193f4ed868 Core/Command: Improve .group list to feature several notes and features to improve handling. 2013-10-17 14:58:37 +02:00
Shauren
565dd4299c Build fix 2013-10-17 00:55:50 +02:00
Shauren
59fd2520fc Core/Creatures: Removed remains of creature_transport table 2013-10-17 00:20:00 +02:00
Shauren
e0cb49af9c Build fix 2013-10-16 19:30:29 +02:00
Shauren
7f0f87d243 Build fix 2013-10-16 19:14:00 +02:00
Shauren
81ec99c95e Build fix 2013-10-16 18:59:34 +02:00
Shauren
ce55647c41 Core/Transports
* Rewritten path generation, now uses splines - timers are a lot more accurate now
* Implemented stopping transports
* Implemented spawning transports in instances
* Implemented spawning gameobjects as transport passengers
* Transport passengers are now stored in creature/gameobject table using gameobject_template.data6 from transport's template as map id
2013-10-16 18:37:29 +02:00
Baeumchen
b1c706a1eb Just, because this typo was annoying... 2013-10-15 06:02:55 +02:00
joschiwald
186e0852d7 Fix non-pch build. 2013-10-14 17:13:27 +02:00
joschiwald
53167ea9a1 Fix build. 2013-10-14 17:04:55 +02:00
Discover-
54272e4768 Merge branch 'master' of https://github.com/TrinityCore/TrinityCore 2013-10-14 16:56:32 +02:00
Discover-
82eda3244a Core/Misc: Ugh.. Fix recent commit that broke the OnHeal hook 😥 2013-10-14 16:56:09 +02:00
joschiwald
0bdeb12636 Scripts/Ahnkahet: Prince Taldaram rewritten to BossAI
Closes #10993
2013-10-14 16:46:03 +02:00
jackpoz
6f98e4106e Scripts/TheBlackMorass: Fix first 7 rifts spawn timings
Partially revert 7e76ab97f8 to properly spawn first 7 rifts. Also allow only 1 EVENT_NEXT_PORTAL event at time.
2013-10-13 18:30:59 +02:00
Discover-
db848f2045 Core/Misc: Fix build after 731b3670fe (again..) 2013-10-12 13:41:00 +02:00
LilleCarl
731b3670fe Make damage and healing references, so that damage can be altered by scripts!
Correct typo (thanks AwkwardDev)
2013-10-11 21:49:06 +02:00