Merge branch 'master' into 4.3.4

Conflicts:
	dep/libmpq/CMakeLists.txt
	src/server/game/Battlefield/BattlefieldMgr.cpp
	src/server/game/Battlefield/BattlefieldMgr.h
	src/server/game/DataStores/DBCStores.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/Creature/Creature.h
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Entities/Unit/StatSystem.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Entities/Vehicle/Vehicle.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Handlers/BattlefieldHandler.cpp
	src/server/game/Handlers/GuildHandler.cpp
	src/server/game/Movement/Spline/MoveSplineInit.cpp
	src/server/game/Server/Protocol/Opcodes.cpp
	src/server/game/Server/WorldSession.h
	src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
	src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
	src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
	src/server/scripts/EasternKingdoms/boss_kruul.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_moonglade.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
	src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
	src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
	src/server/scripts/Spells/spell_dk.cpp
	src/tools/map_extractor/mpq_libmpq.cpp
	src/tools/map_extractor/mpq_libmpq04.h
	src/tools/vmap4_extractor/loadlib/loadlib.h
	src/tools/vmap4_extractor/mpq_libmpq.cpp
	src/tools/vmap4_extractor/mpq_libmpq04.h
This commit is contained in:
DDuarte committed 2014-01-11 17:26:22 +00:00
commit 08003577de
1318 files changed
+2645 -2328

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
+4 -8
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -439,6 +439,8 @@ void SmartAI::EnterEvadeMode()
me->LoadCreaturesAddon();
me->SetLootRecipient(NULL);
me->ResetPlayerDamageReq();
me->SetLastDamagedTime(0);
GetScript()->ProcessEventsFor(SMART_EVENT_EVADE);//must be after aura clear so we can cast spells from db
SetRun(mRun);
@@ -574,7 +576,7 @@ void SmartAI::JustReachedHome()
GetScript()->ProcessEventsFor(SMART_EVENT_REACHED_HOME);
if (!UpdateVictim() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE && me->GetWaypointPath())
me->ToCreature()->GetMotionMaster()->MovePath(me->GetWaypointPath(), true);
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), true);
}
mJustReset = false;
@@ -904,12 +906,6 @@ bool SmartGameObjectAI::QuestReward(Player* player, Quest const* quest, uint32 o
return false;
}
// Called when the dialog status between a player and the gameobject is requested.
uint32 SmartGameObjectAI::GetDialogStatus(Player* /*player*/)
{
return DIALOG_STATUS_SCRIPTED_NO_STATUS;
}
// Called when the gameobject is destroyed (destructible buildings only).
void SmartGameObjectAI::Destroyed(Player* player, uint32 eventId)
{
+3 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -236,7 +236,7 @@ class SmartAI : public CreatureAI
class SmartGameObjectAI : public GameObjectAI
{
public:
SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) { }
SmartGameObjectAI(GameObject* g) : GameObjectAI(g) { }
~SmartGameObjectAI() { }
void UpdateAI(uint32 diff);
@@ -250,7 +250,6 @@ class SmartGameObjectAI : public GameObjectAI
bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/);
bool QuestAccept(Player* player, Quest const* quest);
bool QuestReward(Player* player, Quest const* quest, uint32 opt);
uint32 GetDialogStatus(Player* /*player*/);
void Destroyed(Player* player, uint32 eventId);
void SetData(uint32 id, uint32 value);
void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker);
@@ -258,8 +257,7 @@ class SmartGameObjectAI : public GameObjectAI
void OnStateChanged(uint32 state, Unit* unit);
void EventInform(uint32 eventId);
protected:
GameObject* const go;
private:
SmartScript mScript;
};
#endif
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -2302,7 +2302,7 @@ bool AchievementMgr<T>::RequirementsSatisfied(AchievementCriteriaEntry const* ac
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CAST:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_DEALT:
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_RECEIVED:
case ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL:
@@ -2961,8 +2961,8 @@ char const* AchievementGlobalMgr::GetCriteriaTypeString(AchievementCriteriaTypes
return "HIT_RECEIVED";
case ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED:
return "TOTAL_DAMAGE_RECEIVED";
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED:
return "HIGHEST_HEAL_CASTED";
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CAST:
return "HIGHEST_HEAL_CAST";
case ACHIEVEMENT_CRITERIA_TYPE_TOTAL_HEALING_RECEIVED:
return "TOTAL_HEALING_RECEIVED";
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED:
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+64 -59
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -16,108 +16,122 @@
*/
#include "BattlefieldMgr.h"
#include "Zones/BattlefieldWG.h"
#include "BattlefieldWG.h"
#include "ObjectMgr.h"
#include "Player.h"
BattlefieldMgr::BattlefieldMgr()
{
m_UpdateTimer = 0;
//TC_LOG_DEBUG("bg.battlefield", "Instantiating BattlefieldMgr");
_updateTimer = 0;
}
BattlefieldMgr::~BattlefieldMgr()
{
//TC_LOG_DEBUG("bg.battlefield", "Deleting BattlefieldMgr");
for (BattlefieldSet::iterator itr = m_BattlefieldSet.begin(); itr != m_BattlefieldSet.end(); ++itr)
for (BattlefieldSet::iterator itr = _battlefieldSet.begin(); itr != _battlefieldSet.end(); ++itr)
delete *itr;
_battlefieldMap.clear();
}
void BattlefieldMgr::InitBattlefield()
{
Battlefield* pBf = new BattlefieldWG;
Battlefield* wg = new BattlefieldWG();
// respawn, init variables
if (!pBf->SetupBattlefield())
if (!wg->SetupBattlefield())
{
TC_LOG_INFO("misc", "Battlefield : Wintergrasp init failed.");
delete pBf;
TC_LOG_INFO("bg.battlefield", "Battlefield: Wintergrasp init failed.");
delete wg;
}
else
{
m_BattlefieldSet.push_back(pBf);
TC_LOG_INFO("misc", "Battlefield : Wintergrasp successfully initiated.");
_battlefieldSet.push_back(wg);
TC_LOG_INFO("bg.battlefield", "Battlefield: Wintergrasp successfully initiated.");
}
/* For Cataclysm: Tol Barad
pBf = new BattlefieldTB;
// respawn, init variables
if (!pBf->SetupBattlefield())
{
TC_LOG_DEBUG("bg.battlefield", "Battlefield : Tol Barad init failed.");
delete pBf;
}
else
{
m_BattlefieldSet.push_back(pBf);
TC_LOG_DEBUG("bg.battlefield", "Battlefield : Tol Barad successfully initiated.");
} */
/*
For Cataclysm: Tol Barad
Battlefield* tb = new BattlefieldTB;
// respawn, init variables
if (!tb->SetupBattlefield())
{
TC_LOG_DEBUG("bg.battlefield", "Battlefield: Tol Barad init failed.");
delete tb;
}
else
{
_battlefieldSet.push_back(tb);
TC_LOG_DEBUG("bg.battlefield", "Battlefield: Tol Barad successfully initiated.");
}
*/
}
void BattlefieldMgr::AddZone(uint32 zoneid, Battlefield *handle)
void BattlefieldMgr::AddZone(uint32 zoneId, Battlefield* bf)
{
m_BattlefieldMap[zoneid] = handle;
_battlefieldMap[zoneId] = bf;
}
void BattlefieldMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
void BattlefieldMgr::HandlePlayerEnterZone(Player* player, uint32 zoneId)
{
BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneid);
if (itr == m_BattlefieldMap.end())
BattlefieldMap::iterator itr = _battlefieldMap.find(zoneId);
if (itr == _battlefieldMap.end())
return;
Battlefield* bf = itr->second;
if (bf->HasPlayer(player) || !bf->IsEnabled())
if (!bf->IsEnabled() || bf->HasPlayer(player))
return;
bf->HandlePlayerEnterZone(player, zoneid);
TC_LOG_DEBUG("bg.battlefield", "Player %u entered outdoorpvp id %u", player->GetGUIDLow(), bf->GetTypeId());
bf->HandlePlayerEnterZone(player, zoneId);
TC_LOG_DEBUG("bg.battlefield", "Player %u entered battlefield id %u", player->GetGUIDLow(), bf->GetTypeId());
}
void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneId)
{
BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneid);
if (itr == m_BattlefieldMap.end())
BattlefieldMap::iterator itr = _battlefieldMap.find(zoneId);
if (itr == _battlefieldMap.end())
return;
// teleport: remove once in removefromworld, once in updatezone
if (!itr->second->HasPlayer(player))
return;
itr->second->HandlePlayerLeaveZone(player, zoneid);
TC_LOG_DEBUG("bg.battlefield", "Player %u left outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
itr->second->HandlePlayerLeaveZone(player, zoneId);
TC_LOG_DEBUG("bg.battlefield", "Player %u left battlefield id %u", player->GetGUIDLow(), itr->second->GetTypeId());
}
Battlefield *BattlefieldMgr::GetBattlefieldToZoneId(uint32 zoneid)
Battlefield* BattlefieldMgr::GetBattlefieldToZoneId(uint32 zoneId)
{
BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneid);
if (itr == m_BattlefieldMap.end())
BattlefieldMap::iterator itr = _battlefieldMap.find(zoneId);
if (itr == _battlefieldMap.end())
{
// no handle for this zone, return
return NULL;
}
if (!itr->second->IsEnabled())
return NULL;
return itr->second;
}
Battlefield *BattlefieldMgr::GetBattlefieldByBattleId(uint32 battleid)
Battlefield* BattlefieldMgr::GetBattlefieldByBattleId(uint32 battleId)
{
for (BattlefieldSet::iterator itr = m_BattlefieldSet.begin(); itr != m_BattlefieldSet.end(); ++itr)
for (BattlefieldSet::iterator itr = _battlefieldSet.begin(); itr != _battlefieldSet.end(); ++itr)
{
if ((*itr)->GetBattleId() == battleid)
return (*itr);
if ((*itr)->GetBattleId() == battleId)
return *itr;
}
return NULL;
}
ZoneScript* BattlefieldMgr::GetZoneScript(uint32 zoneId)
{
BattlefieldMap::iterator itr = _battlefieldMap.find(zoneId);
if (itr != _battlefieldMap.end())
return itr->second;
return NULL;
}
Battlefield* BattlefieldMgr::GetBattlefieldByGUID(uint64 guid)
{
for (BattlefieldSet::iterator itr = m_BattlefieldSet.begin(); itr != m_BattlefieldSet.end(); ++itr)
@@ -129,21 +143,12 @@ Battlefield* BattlefieldMgr::GetBattlefieldByGUID(uint64 guid)
void BattlefieldMgr::Update(uint32 diff)
{
m_UpdateTimer += diff;
if (m_UpdateTimer > BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL)
_updateTimer += diff;
if (_updateTimer > BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL)
{
for (BattlefieldSet::iterator itr = m_BattlefieldSet.begin(); itr != m_BattlefieldSet.end(); ++itr)
for (BattlefieldSet::iterator itr = _battlefieldSet.begin(); itr != _battlefieldSet.end(); ++itr)
if ((*itr)->IsEnabled())
(*itr)->Update(m_UpdateTimer);
m_UpdateTimer = 0;
(*itr)->Update(_updateTimer);
_updateTimer = 0;
}
}
ZoneScript* BattlefieldMgr::GetZoneScript(uint32 zoneId)
{
BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneId);
if (itr != m_BattlefieldMap.end())
return itr->second;
else
return NULL;
}
+33 -42
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -19,61 +19,52 @@
#define BATTLEFIELD_MGR_H_
#include "Battlefield.h"
#include "ace/Singleton.h"
#include <ace/Singleton.h>
class Player;
class GameObject;
class Creature;
class ZoneScript;
struct GossipMenuItems;
// class to handle player enter / leave / areatrigger / GO use events
class BattlefieldMgr
{
public:
// ctor
BattlefieldMgr();
// dtor
~BattlefieldMgr();
public:
// ctor
BattlefieldMgr();
// dtor
~BattlefieldMgr();
// create battlefield events
void InitBattlefield();
// called when a player enters an battlefield area
void HandlePlayerEnterZone(Player* player, uint32 areaflag);
// called when player leaves an battlefield area
void HandlePlayerLeaveZone(Player* player, uint32 areaflag);
// called when player resurrects
void HandlePlayerResurrects(Player* player, uint32 areaflag);
// return assigned battlefield
Battlefield* GetBattlefieldToZoneId(uint32 zoneid);
Battlefield* GetBattlefieldByBattleId(uint32 battleid);
// create battlefield events
void InitBattlefield();
// called when a player enters an battlefield area
void HandlePlayerEnterZone(Player* player, uint32 zoneId);
// called when player leaves an battlefield area
void HandlePlayerLeaveZone(Player* player, uint32 zoneId);
// return assigned battlefield
Battlefield* GetBattlefieldToZoneId(uint32 zoneId);
Battlefield* GetBattlefieldByBattleId(uint32 battleId);
Battlefield *GetBattlefieldByGUID(uint64 guid);
ZoneScript* GetZoneScript(uint32 zoneId);
ZoneScript* GetZoneScript(uint32 zoneId);
void AddZone(uint32 zoneid, Battlefield * handle);
void AddZone(uint32 zoneId, Battlefield* bf);
void Update(uint32 diff);
void Update(uint32 diff);
void HandleGossipOption(Player* player, uint64 guid, uint32 gossipid);
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems gso);
void HandleDropFlag(Player* player, uint32 spellId);
typedef std::vector < Battlefield * >BattlefieldSet;
typedef std::map < uint32 /* zoneid */, Battlefield * >BattlefieldMap;
private:
// contains all initiated battlefield events
// used when initing / cleaning up
BattlefieldSet m_BattlefieldSet;
// maps the zone ids to an battlefield event
// used in player event handling
BattlefieldMap m_BattlefieldMap;
// update interval
uint32 m_UpdateTimer;
private:
typedef std::vector<Battlefield*> BattlefieldSet;
typedef std::map<uint32 /*zoneId*/, Battlefield*> BattlefieldMap;
// contains all initiated battlefield events
// used when initing / cleaning up
BattlefieldSet _battlefieldSet;
// maps the zone ids to an battlefield event
// used in player event handling
BattlefieldMap _battlefieldMap;
// update interval
uint32 _updateTimer;
};
#define sBattlefieldMgr ACE_Singleton<BattlefieldMgr, ACE_Null_Mutex>::instance()
#endif
#endif // BATTLEFIELD_MGR_H_
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -30,14 +30,6 @@
#include "Vehicle.h"
#include "WorldSession.h"
enum WGVehicles
{
NPC_WG_SEIGE_ENGINE_ALLIANCE = 28312,
NPC_WG_SEIGE_ENGINE_HORDE = 32627,
NPC_WG_DEMOLISHER = 28094,
NPC_WG_CATAPULT = 27881
};
BattlefieldWG::~BattlefieldWG()
{
for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr)
@@ -192,7 +184,7 @@ bool BattlefieldWG::SetupBattlefield()
if (GameObject* go = SpawnGameObject(WGPortalDefenderData[i].entry, WGPortalDefenderData[i].x, WGPortalDefenderData[i].y, WGPortalDefenderData[i].z, WGPortalDefenderData[i].o))
{
DefenderPortalList.insert(go->GetGUID());
go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]);
go->SetFaction(WintergraspFaction[GetDefenderTeam()]);
}
}
@@ -222,7 +214,7 @@ void BattlefieldWG::OnBattleStart()
if (GameObject* relic = SpawnGameObject(GO_WINTERGRASP_TITAN_S_RELIC, 5440.0f, 2840.8f, 430.43f, 0))
{
// Update faction of relic, only attacker can click on
relic->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetAttackerTeam()]);
relic->SetFaction(WintergraspFaction[GetAttackerTeam()]);
// Set in use (not allow to click on before last door is broken)
relic->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
m_titansRelicGUID = relic->GetGUID();
@@ -360,7 +352,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
// Update portal defender faction
for (GuidSet::const_iterator itr = DefenderPortalList.begin(); itr != DefenderPortalList.end(); ++itr)
if (GameObject* portal = GetGameObject(*itr))
portal->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]);
portal->SetFaction(WintergraspFaction[GetDefenderTeam()]);
// Saving data
for (GameObjectBuilding::const_iterator itr = BuildingsInZone.begin(); itr != BuildingsInZone.end(); ++itr)
@@ -813,6 +805,9 @@ uint32 BattlefieldWG::GetData(uint32 data) const
// Graveyards and Workshops are controlled by the same team.
if (BfGraveyard const* graveyard = GetGraveyardById(GetSpiritGraveyardId(data)))
return graveyard->GetControlTeamId();
break;
default:
break;
}
return Battlefield::GetData(data);
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -1133,7 +1133,7 @@ struct BfWGGameObjectBuilding
m_WG->SendUpdateWorldState(m_WorldState, m_State);
}
UpdateCreatureAndGo();
build->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_Team]);
build->SetFaction(WintergraspFaction[m_Team]);
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
Loaded 100 of 1318 files, more files were not shown because too many files have changed in this diff. Show more