Skip to content

Commit

Permalink
[12242] Use Pool system for BG buff
Browse files Browse the repository at this point in the history
Drop not required manual handling of BG-Objects

Signed-off-by: Schmoozerd <schmoozerd@cmangos>
  • Loading branch information
Cyberium authored and Schmoozerd committed Nov 3, 2012
1 parent 53b0628 commit cd9563c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 201 deletions.
107 changes: 2 additions & 105 deletions src/game/BattleGround/BattleGround.cpp
Expand Up @@ -221,7 +221,6 @@ BattleGround::BattleGround()
m_StartTime = 0;
m_Events = 0;
m_IsRated = false;
m_BuffChange = false;
m_Name = "";
m_LevelMin = 0;
m_LevelMax = 0;
Expand Down Expand Up @@ -280,11 +279,6 @@ BattleGround::~BattleGround()
{
// remove objects and creatures
// (this is done automatically in mapmanager update, when the instance is reset after the reset time)

int size = m_BgObjects.size();
for (int i = 0; i < size; ++i)
DelObject(i);

sBattleGroundMgr.RemoveBattleGround(GetInstanceID(), GetTypeID());

// skip template bgs as they were never added to visible bg list
Expand Down Expand Up @@ -1387,48 +1381,6 @@ void BattleGround::UpdatePlayerScore(Player* Source, uint32 type, uint32 value)
}
}

bool BattleGround::AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 /*respawnTime*/)
{
// must be created this way, adding to godatamap would add it to the base map of the instance
// and when loading it (in go::LoadFromDB()), a new guid would be assigned to the object, and a new object would be created
// so we must create it specific for this instance
GameObject* go = new GameObject;
if (!go->Create(GetBgMap()->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), entry, GetBgMap(),
PHASEMASK_NORMAL, x, y, z, o, QuaternionData(rotation0, rotation1, rotation2, rotation3)))
{
sLog.outErrorDb("Gameobject template %u not found in database! BattleGround not created!", entry);
sLog.outError("Cannot create gameobject template %u! BattleGround not created!", entry);
delete go;
return false;
}
/*
uint32 guid = go->GetGUIDLow();
// without this, UseButtonOrDoor caused the crash, since it tried to get go info from godata
// iirc that was changed, so adding to go data map is no longer required if that was the only function using godata from GameObject without checking if it existed
GameObjectData& data = sObjectMgr.NewGOData(guid);
data.id = entry;
data.mapid = GetMapId();
data.posX = x;
data.posY = y;
data.posZ = z;
data.orientation = o;
data.rotation0 = rotation0;
data.rotation1 = rotation1;
data.rotation2 = rotation2;
data.rotation3 = rotation3;
data.spawntimesecs = respawnTime;
data.spawnMask = 1;
data.animprogress = 100;
data.go_state = 1;
*/
// add to world, so it can be later looked up from HashMapHolder
go->AddToWorld();
m_BgObjects[type] = go->GetObjectGuid();
return true;
}

// some doors aren't despawned so we cannot handle their closing in gameobject::update()
// it would be nice to correctly implement GO_ACTIVATED state and open/close doors in gameobject code
void BattleGround::DoorClose(ObjectGuid guid)
Expand Down Expand Up @@ -1597,24 +1549,6 @@ void BattleGround::SpawnBGCreature(ObjectGuid guid, uint32 respawntime)
}
}

bool BattleGround::DelObject(uint32 type)
{
if (!m_BgObjects[type])
return true;

GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]);
if (!obj)
{
sLog.outError("Can't find gobject: %s", m_BgObjects[type].GetString().c_str());
return false;
}

obj->SetRespawnTime(0); // not save respawn time
obj->Delete();
m_BgObjects[type].Clear();
return true;
}

void BattleGround::SendMessageToAll(int32 entry, ChatMsg type, Player const* source)
{
MaNGOS::BattleGroundChatBuilder bg_builder(type, entry, source);
Expand Down Expand Up @@ -1679,45 +1613,8 @@ void BattleGround::HandleTriggerBuff(ObjectGuid go_guid)
if (!obj || obj->GetGoType() != GAMEOBJECT_TYPE_TRAP || !obj->isSpawned())
return;

// static buffs are already handled just by database and don't need
// battleground code
if (!m_BuffChange)
{
obj->SetLootState(GO_JUST_DEACTIVATED); // can be despawned or destroyed
return;
}

// change buff type, when buff is used:
// TODO this can be done when poolsystem works for instances
int32 index = m_BgObjects.size() - 1;
while (index >= 0 && m_BgObjects[index] != go_guid)
--index;
if (index < 0)
{
sLog.outError("BattleGround (Type: %u) has buff trigger %s GOType: %u but it hasn't that object in its internal data",
GetTypeID(), go_guid.GetString().c_str(), obj->GetGoType());
return;
}

// randomly select new buff
uint8 buff = urand(0, 2);
uint32 entry = obj->GetEntry();
if (m_BuffChange && entry != Buff_Entries[buff])
{
// despawn current buff
SpawnBGObject(m_BgObjects[index], RESPAWN_ONE_DAY);
// set index for new one
for (uint8 currBuffTypeIndex = 0; currBuffTypeIndex < 3; ++currBuffTypeIndex)
{
if (entry == Buff_Entries[currBuffTypeIndex])
{
index -= currBuffTypeIndex;
index += buff;
}
}
}

SpawnBGObject(m_BgObjects[index], BUFF_RESPAWN_TIME);
obj->SetLootState(GO_JUST_DEACTIVATED); // can be despawned or destroyed
return;
}

void BattleGround::HandleKillPlayer(Player* player, Player* killer)
Expand Down
4 changes: 0 additions & 4 deletions src/game/BattleGround/BattleGround.h
Expand Up @@ -503,12 +503,8 @@ class BattleGround

void HandleTriggerBuff(ObjectGuid go_guid);

// TODO drop m_BGObjects
GuidVector m_BgObjects;
void SpawnBGObject(ObjectGuid guid, uint32 respawntime);
bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime = 0);
void SpawnBGCreature(ObjectGuid guid, uint32 respawntime);
bool DelObject(uint32 type);

void DoorOpen(ObjectGuid guid);
void DoorClose(ObjectGuid guid);
Expand Down
31 changes: 0 additions & 31 deletions src/game/BattleGround/BattleGroundAB.cpp
Expand Up @@ -31,9 +31,6 @@

BattleGroundAB::BattleGroundAB()
{
m_BuffChange = true;
m_BgObjects.resize(BG_AB_OBJECT_MAX);

m_StartMessageIds[BG_STARTING_EVENT_FIRST] = 0;
m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AB_START_ONE_MINUTE;
m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AB_START_HALF_MINUTE;
Expand Down Expand Up @@ -159,21 +156,8 @@ void BattleGroundAB::Update(uint32 diff)
}
}

void BattleGroundAB::StartingEventCloseDoors()
{
// despawn buffs
for (uint8 i = 0; i < BG_AB_NODES_MAX * 3; ++i)
SpawnBGObject(m_BgObjects[BG_AB_OBJECT_SPEEDBUFF_STABLES + i], RESPAWN_ONE_DAY);
}

void BattleGroundAB::StartingEventOpenDoors()
{
for (uint8 i = 0; i < BG_AB_NODES_MAX; ++i)
{
// randomly select buff to spawn
uint8 buff = urand(0, 2);
SpawnBGObject(m_BgObjects[BG_AB_OBJECT_SPEEDBUFF_STABLES + buff + i * 3], RESPAWN_IMMEDIATELY);
}
OpenDoorEvent(BG_EVENT_DOOR);

// Players that join battleground after start are not eligible to get achievement.
Expand Down Expand Up @@ -441,21 +425,6 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* target
PlaySoundToAll(sound);
}

bool BattleGroundAB::SetupBattleGround()
{
// buffs
for (uint8 i = 0; i < BG_AB_NODES_MAX; ++i)
{
if (!AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i, Buff_Entries[0], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3] / 2), cos(BG_AB_BuffPositions[i][3] / 2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 1, Buff_Entries[1], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3] / 2), cos(BG_AB_BuffPositions[i][3] / 2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 2, Buff_Entries[2], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3] / 2), cos(BG_AB_BuffPositions[i][3] / 2), RESPAWN_ONE_DAY)
)
sLog.outErrorDb("BatteGroundAB: Failed to spawn buff object!");
}

return true;
}

void BattleGroundAB::Reset()
{
// call parent's class reset
Expand Down
25 changes: 0 additions & 25 deletions src/game/BattleGround/BattleGroundAB.h
Expand Up @@ -63,29 +63,6 @@ const uint32 BG_AB_OP_NODESTATES[5] = {1767, 1782, 1772, 1792, 1787};

const uint32 BG_AB_OP_NODEICONS[5] = {1842, 1846, 1845, 1844, 1843};

enum BG_AB_ObjectType
{
// TODO drop them (pool-system should be used for this)
// buffs
BG_AB_OBJECT_SPEEDBUFF_STABLES = 1,
BG_AB_OBJECT_REGENBUFF_STABLES = 2,
BG_AB_OBJECT_BERSERKBUFF_STABLES = 3,
BG_AB_OBJECT_SPEEDBUFF_BLACKSMITH = 4,
BG_AB_OBJECT_REGENBUFF_BLACKSMITH = 5,
BG_AB_OBJECT_BERSERKBUFF_BLACKSMITH = 6,
BG_AB_OBJECT_SPEEDBUFF_FARM = 7,
BG_AB_OBJECT_REGENBUFF_FARM = 8,
BG_AB_OBJECT_BERSERKBUFF_FARM = 9,
BG_AB_OBJECT_SPEEDBUFF_LUMBER_MILL = 10,
BG_AB_OBJECT_REGENBUFF_LUMBER_MILL = 11,
BG_AB_OBJECT_BERSERKBUFF_LUMBER_MILL = 12,
BG_AB_OBJECT_SPEEDBUFF_GOLD_MINE = 13,
BG_AB_OBJECT_REGENBUFF_GOLD_MINE = 14,
BG_AB_OBJECT_BERSERKBUFF_GOLD_MINE = 15,
BG_AB_OBJECT_MAX = 16,
};


This comment has been minimized.

Copy link
@DomGries

DomGries Nov 4, 2012

Contributor

A similar enum EYBuffs in EY.h might also be dropped ;)

/* node events */
// node-events are just event1=BG_AB_Nodes, event2=BG_AB_NodeStatus
// so we don't need to define the constants here :)
Expand Down Expand Up @@ -184,11 +161,9 @@ class BattleGroundAB : public BattleGround

void Update(uint32 diff) override;
void AddPlayer(Player* plr) override;
virtual void StartingEventCloseDoors() override;

This comment has been minimized.

Copy link
@DomGries

DomGries Nov 4, 2012

Contributor

This function is overridden in every bg file even if it is empty ... should either revert this or remove all other empty StartingEventCloseDoors() functions of bg files I think

This comment has been minimized.

Copy link
@cyberium

cyberium Nov 4, 2012

Member

@Schmoozerd : I choosed to let it due to any further possibility to add script hook or any event must trigger on that event.
Same thing about setup battleground.

btw all the code of BG must be rewrited.

This comment has been minimized.

Copy link
@Schmoozerd

Schmoozerd Nov 4, 2012

Member

Ah thank you both - will think of either readding the functions or removing the others as well.

(I think the original intention might have been to define them as abstract in BG-class, but this wasn't done properly..)

virtual void StartingEventOpenDoors() override;
void RemovePlayer(Player* plr, ObjectGuid guid) override;
void HandleAreaTrigger(Player* source, uint32 trigger) override;
virtual bool SetupBattleGround() override;
virtual void Reset() override;
void EndBattleGround(Team winner) override;
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
Expand Down
4 changes: 2 additions & 2 deletions src/game/BattleGround/BattleGroundBE.cpp
Expand Up @@ -119,10 +119,10 @@ void BattleGroundBE::HandleAreaTrigger(Player* source, uint32 trigger)
switch (trigger)
{
case 4538: // buff trigger?
// buff_guid = m_BgObjects[BG_BE_OBJECT_BUFF_1];
// buff_guid = -nonexistingStorage-[BG_BE_OBJECT_BUFF_1];
break;
case 4539: // buff trigger?
// buff_guid = m_BgObjects[BG_BE_OBJECT_BUFF_2];
// buff_guid = -nonexistingStorage-[BG_BE_OBJECT_BUFF_2];
break;
default:
sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", trigger);
Expand Down
30 changes: 0 additions & 30 deletions src/game/BattleGround/BattleGroundEY.cpp
Expand Up @@ -30,9 +30,6 @@

BattleGroundEY::BattleGroundEY()
{
m_BuffChange = true;
m_BgObjects.resize(EY_OBJECT_MAX);

m_StartMessageIds[BG_STARTING_EVENT_FIRST] = 0;
m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_EY_START_ONE_MINUTE;
m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_EY_START_HALF_MINUTE;
Expand Down Expand Up @@ -84,13 +81,6 @@ void BattleGroundEY::StartingEventOpenDoors()
// eye-doors are despawned, not opened
SpawnEvent(BG_EVENT_DOOR, 0, false);

for (uint8 i = 0; i < EY_NODES_MAX; ++i)
{
// randomly spawn buff
uint8 buff = urand(0, 2);
SpawnBGObject(m_BgObjects[EY_OBJECT_SPEEDBUFF_FEL_REAVER_RUINS + buff + i * 3], RESPAWN_IMMEDIATELY);
}

// Players that join battleground after start are not eligible to get achievement.
StartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, EY_EVENT_START_BATTLE);
}
Expand Down Expand Up @@ -317,26 +307,6 @@ void BattleGroundEY::HandleAreaTrigger(Player* source, uint32 trigger)
}
}

bool BattleGroundEY::SetupBattleGround()
{
// buffs
for (uint8 i = 0; i < EY_NODES_MAX; ++i)
{
AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(eyTriggers[i]);
if (!at)
{
sLog.outError("BattleGroundEY: Unknown trigger: %u", eyTriggers[i]);
continue;
}
if (!AddObject(EY_OBJECT_SPEEDBUFF_FEL_REAVER_RUINS + i * 3, Buff_Entries[0], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|| !AddObject(EY_OBJECT_SPEEDBUFF_FEL_REAVER_RUINS + i * 3 + 1, Buff_Entries[1], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|| !AddObject(EY_OBJECT_SPEEDBUFF_FEL_REAVER_RUINS + i * 3 + 2, Buff_Entries[2], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY))
sLog.outError("BattleGroundEY: Cannot spawn buff");
}

return true;
}

void BattleGroundEY::Reset()
{
// call parent's class reset
Expand Down
1 change: 0 additions & 1 deletion src/game/BattleGround/BattleGroundEY.h
Expand Up @@ -281,7 +281,6 @@ class BattleGroundEY : public BattleGround
void HandleKillPlayer(Player* player, Player* killer) override;

virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
virtual bool SetupBattleGround() override;
virtual void Reset() override;
void UpdateTeamScore(Team team);
void EndBattleGround(Team winner) override;
Expand Down
6 changes: 4 additions & 2 deletions src/game/PoolManager.cpp
Expand Up @@ -795,7 +795,8 @@ void PoolManager::LoadFromDB()
GameObjectInfo const* goinfo = ObjectMgr::GetGameObjectInfo(data->id);
if (goinfo->type != GAMEOBJECT_TYPE_CHEST &&
goinfo->type != GAMEOBJECT_TYPE_GOOBER &&
goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE)
goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE &&
goinfo->type != GAMEOBJECT_TYPE_TRAP)
{
sLog.outErrorDb("`pool_gameobject` has a not lootable gameobject spawn (GUID: %u, type: %u) defined for pool id (%u), skipped.", guid, goinfo->type, pool_id);
continue;
Expand Down Expand Up @@ -868,7 +869,8 @@ void PoolManager::LoadFromDB()
GameObjectInfo const* goinfo = ObjectMgr::GetGameObjectInfo(data->id);
if (goinfo->type != GAMEOBJECT_TYPE_CHEST &&
goinfo->type != GAMEOBJECT_TYPE_GOOBER &&
goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE)
goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE &&
goinfo->type != GAMEOBJECT_TYPE_TRAP)
{
sLog.outErrorDb("`pool_gameobject_template` has a not lootable gameobject spawn (GUID: %u Entry %u Type: %u) defined for pool id (%u), skipped.", guid, entry_id, goinfo->type, pool_id);
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12241"
#define REVISION_NR "12242"
#endif // __REVISION_NR_H__

2 comments on commit cd9563c

@Schmoozerd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need some SQL code similar to this:
NOTE: Use this only if you are able to revert these custom GUIDs and Pools !

-- Sql to create buff object pool for some BG

-- Arathi bassin
-- -------------

-- Stable
REPLACE INTO `gameobject` VALUES (150000, 179871, 529, 1, 1, 1185.71, 1185.24, -56.36, 2.56, 0, 0, 0.022338351, 0.999750467, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150001, 179904, 529, 1, 1, 1185.71, 1185.24, -56.36, 2.56, 0, 0, 0.022338351, 0.999750467, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150002, 179905, 529, 1, 1, 1185.71, 1185.24, -56.36, 2.56, 0, 0, 0.022338351, 0.999750467, 180, 100, 1);

-- Blacksmith
REPLACE INTO `gameobject` VALUES (150003, 179871, 529, 1, 1, 990.75, 1008.18, -42.60, 2.43, 0, 0, 0.021204161, 0.999775166, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150004, 179904, 529, 1, 1, 990.75, 1008.18, -42.60, 2.43, 0, 0, 0.021204161, 0.999775166, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150005, 179905, 529, 1, 1, 990.75, 1008.18, -42.60, 2.43, 0, 0, 0.021204161, 0.999775166, 180, 100, 1);

-- Farm
REPLACE INTO `gameobject` VALUES (150006, 179871, 529, 1, 1, 817.66, 843.34, -56.54, 3.01, 0, 0, 0.026264184, 0.999655036, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150007, 179904, 529, 1, 1, 817.66, 843.34, -56.54, 3.01, 0, 0, 0.026264184, 0.999655036, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150008, 179905, 529, 1, 1, 817.66, 843.34, -56.54, 3.01, 0, 0, 0.026264184, 0.999655036, 180, 100, 1);

-- Lumber Mill
REPLACE INTO `gameobject` VALUES (150009, 179871, 529, 1, 1, 807.46, 1189.16, 11.92, 5.44, 0, 0, 0.047455126, 0.998873370, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150010, 179904, 529, 1, 1, 807.46, 1189.16, 11.92, 5.44, 0, 0, 0.047455126, 0.998873370, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150011, 179905, 529, 1, 1, 807.46, 1189.16, 11.92, 5.44, 0, 0, 0.047455126, 0.998873370, 180, 100, 1);

-- Gold Mine
REPLACE INTO `gameobject` VALUES (150012, 179871, 529, 1, 1, 1146.62, 816.94, -98.49, 6.0, 0, 0, 0.053555973, 0.998564849, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150013, 179904, 529, 1, 1, 1146.62, 816.94, -98.49, 6.0, 0, 0, 0.053555973, 0.998564849, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150014, 179905, 529, 1, 1, 1146.62, 816.94, -98.49, 6.0, 0, 0, 0.053555973, 0.998564849, 180, 100, 1);

-- Add pool id
REPLACE INTO `pool_template` VALUES (15000, 1, "Stable power up buff");
REPLACE INTO `pool_template` VALUES (15001, 1, "Blacksmith power up buff");
REPLACE INTO `pool_template` VALUES (15002, 1, "Farm power up buff");
REPLACE INTO `pool_template` VALUES (15003, 1, "Lumber Mill power up buff");
REPLACE INTO `pool_template` VALUES (15004, 1, "Gold Mine power up buff");

-- Add Stable pool
REPLACE INTO `pool_gameobject` VALUES (150000, 15000, 0, "Stable : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150001, 15000, 0, "Stable : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150002, 15000, 0, "Stable : Berserker buff");

-- Add Blacksmith pool
REPLACE INTO `pool_gameobject` VALUES (150003, 15001, 0, "Blacksmith : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150004, 15001, 0, "Blacksmith : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150005, 15001, 0, "Blacksmith : Berserker buff");

-- Add Farm pool
REPLACE INTO `pool_gameobject` VALUES (150006, 15002, 0, "Farm : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150007, 15002, 0, "Farm : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150008, 15002, 0, "Farm : Berserker buff");

-- Add Lumber Mill pool
REPLACE INTO `pool_gameobject` VALUES (150009, 15003, 0, "Lumber Mill : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150010, 15003, 0, "Lumber Mill : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150011, 15003, 0, "Lumber Mill : Berserker buff");

-- Add Gold Mine pool
REPLACE INTO `pool_gameobject` VALUES (150012, 15004, 0, "Gold Mine : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150013, 15004, 0, "Gold Mine : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150014, 15004, 0, "Gold Mine : Berserker buff");

-- Eye of Storm
-- ------------

-- Blood Elf Tower
REPLACE INTO `gameobject` VALUES (150050, 179871, 566, 1, 1, 2050.4599609375, 1372.26000976563, 1194.56005859375, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150051, 179904, 566, 1, 1, 2050.4599609375, 1372.26000976563, 1194.56005859375, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150052, 179905, 566, 1, 1, 2050.4599609375, 1372.26000976563, 1194.56005859375, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);

-- Fel REaver Ruins Tower
REPLACE INTO `gameobject` VALUES (150053, 179871, 566, 1, 1, 2046.32995605469, 1748.81005859375, 1190.03002929688, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150054, 179904, 566, 1, 1, 2046.32995605469, 1748.81005859375, 1190.03002929688, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150055, 179905, 566, 1, 1, 2046.32995605469, 1748.81005859375, 1190.03002929688, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);

-- Mage Tower
REPLACE INTO `gameobject` VALUES (150056, 179871, 566, 1, 1, 2283.3798828125, 1748.81005859375, 1189.7099609375, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150057, 179904, 566, 1, 1, 2283.3798828125, 1748.81005859375, 1189.7099609375, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150058, 179905, 566, 1, 1, 2283.3798828125, 1748.81005859375, 1189.7099609375, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);

-- Draenei Ruins Tower
REPLACE INTO `gameobject` VALUES (150059, 179871, 566, 1, 1, 2302.68994140625, 1391.27001953125, 1197.77001953125, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150060, 179904, 566, 1, 1, 2302.68994140625, 1391.27001953125, 1197.77001953125, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);
REPLACE INTO `gameobject` VALUES (150061, 179905, 566, 1, 1, 2302.68994140625, 1391.27001953125, 1197.77001953125, 0.907571, 0, 0, 0.438371, 0.898794, 180, 100, 1);

-- Add pool id
REPLACE INTO `pool_template` VALUES (15010, 1, "Blood Elf Tower power up buff");
REPLACE INTO `pool_template` VALUES (15011, 1, "Fel Reaver Ruins Tower power up buff");
REPLACE INTO `pool_template` VALUES (15012, 1, "Mage Tower power up buff");
REPLACE INTO `pool_template` VALUES (15013, 1, "Dreanei Ruins Tower power up buff");

-- Add Blood Elf Tower pool
REPLACE INTO `pool_gameobject` VALUES (150050, 15010, 0, "Blood Elf Tower : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150051, 15010, 0, "Blood Elf Tower : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150052, 15010, 0, "Blood Elf Tower : Berserker buff");

-- Add Fel Reaver Ruins Tower pool
REPLACE INTO `pool_gameobject` VALUES (150053, 15011, 0, "Fel Reaver Ruins Tower : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150054, 15011, 0, "Fel Reaver Ruins Tower : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150055, 15011, 0, "Fel Reaver Ruins Tower : Berserker buff");

-- Add Mage Tower pool
REPLACE INTO `pool_gameobject` VALUES (150056, 15012, 0, "Mage Tower : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150057, 15012, 0, "Mage Tower : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150058, 15012, 0, "Mage Tower : Berserker buff");

-- Add Dreanei Ruins Tower pool
REPLACE INTO `pool_gameobject` VALUES (150059, 15013, 0, "Dreanei Ruins Tower : Speed buff");
REPLACE INTO `pool_gameobject` VALUES (150060, 15013, 0, "Dreanei Ruins Tower : Regen buff");
REPLACE INTO `pool_gameobject` VALUES (150061, 15013, 0, "Dreanei Ruins Tower : Berserker buff");

@cyberium
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sql above designed for UDB. Use that http://paste2.org/p/2392655 for YTDB.

Note to DB Dev : must correct rotation value of spawned buff.

Please sign in to comment.