|
Архив - только для чтения |
| Модератор форума: andycrowz |
| Форум Корзина форума Корзина патчи на арены и бг(рангом бг) |
| патчи на арены и бг(рангом бг) |
арена даларана
1.patch Code diff --git a/src/game/BattleGroundDS.cpp b/src/game/BattleGroundDS.cpp index e6a298d..4f2fcd3 100644 --- a/src/game/BattleGroundDS.cpp +++ b/src/game/BattleGroundDS.cpp @@ -16,14 +16,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "Object.h" #include "Player.h" #include "BattleGround.h" #include "BattleGroundDS.h" +#include "ObjectMgr.h" +#include "WorldPacket.h" #include "Language.h" BattleGroundDS::BattleGroundDS() { - m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M; m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; @@ -43,6 +45,24 @@ BattleGroundDS::~BattleGroundDS() void BattleGroundDS::Update(uint32 diff) { BattleGround::Update(diff); + if (GetStatus() == STATUS_IN_PROGRESS) + { + // knockback + if(m_uiKnockback < diff) + { + for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) + { + Player * plr = sObjectMgr.GetPlayer(itr->first); + if (plr && plr->IsWithinLOS(1214,765,14) && plr->GetDistance2d(1214, 765) <= 50) + plr->KnockBackPlayerWithAngle(6.40f,55,7); + if (plr && plr->IsWithinLOS(1369,817,14) && plr->GetDistance2d(1369, 817) <= 50) + plr->KnockBackPlayerWithAngle(3.03f,55,7); + } + m_uiKnockback = 1000; + } + else + m_uiKnockback -= diff; + } } void BattleGroundDS::StartingEventCloseDoors() @@ -51,6 +71,7 @@ void BattleGroundDS::StartingEventCloseDoors() void BattleGroundDS::StartingEventOpenDoors() { + OpenDoorEvent(BG_EVENT_DOOR); } void BattleGroundDS::AddPlayer(Player *plr) @@ -60,19 +81,76 @@ void BattleGroundDS::AddPlayer(Player *plr) BattleGroundDSScore* sc = new BattleGroundDSScore; m_PlayerScores[plr->GetGUID()] = sc; + + UpdateWorldState(0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); + UpdateWorldState(0xe10, GetAlivePlayersCountByTeam(HORDE)); +} + +void BattleGroundDS::RemovePlayer(Player* /*plr*/, uint64 /*guid*/) +{ + if (GetStatus() == STATUS_WAIT_LEAVE) + return; + + UpdateWorldState(0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); + UpdateWorldState(0xe10, GetAlivePlayersCountByTeam(HORDE)); + + CheckArenaWinConditions(); } -void BattleGroundDS::RemovePlayer(Player * /*plr*/, uint64 /*guid*/) +void BattleGroundDS::HandleKillPlayer(Player *player, Player *killer) { + if (GetStatus() != STATUS_IN_PROGRESS) + return; + + if (!killer) + { + sLog.outError("BattleGroundDS: Killer player not found"); + return; + } + + BattleGround::HandleKillPlayer(player,killer); + + UpdateWorldState(0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); + UpdateWorldState(0xe10, GetAlivePlayersCountByTeam(HORDE)); + + CheckArenaWinConditions(); +} + +bool BattleGroundDS::HandlePlayerUnderMap(Player *player) +{ + player->TeleportTo(GetMapId(),1299.046f,784.825f,9.338f,player->GetOrientation(),false); + return true; +} + +void BattleGroundDS::HandleAreaTrigger(Player *Source, uint32 Trigger) +{ + if (GetStatus() != STATUS_IN_PROGRESS) + return; + + switch(Trigger) + { + case 5347: + case 5348: + break; + default: + sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); + break; + } } -void BattleGroundDS::HandleKillPlayer(Player* player, Player* killer) +void BattleGroundDS::FillInitialWorldStates(WorldPacket &data, uint32& count) { - BattleGround::HandleKillPlayer(player, killer); + FillInitialWorldState(data, count, 0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); + FillInitialWorldState(data, count, 0xe10, GetAlivePlayersCountByTeam(HORDE)); + FillInitialWorldState(data, count, 0xe1a, 1); } -void BattleGroundDS::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/) +void BattleGroundDS::Reset() { + //call parent's class reset + BattleGround::Reset(); + m_uiKnockback = 5000; } bool BattleGroundDS::SetupBattleGround() diff --git a/src/game/BattleGroundDS.h b/src/game/BattleGroundDS.h index 0034226..2d21b58 100644 --- a/src/game/BattleGroundDS.h +++ b/src/game/BattleGroundDS.h @@ -45,6 +45,11 @@ class BattleGroundDS : public BattleGround void RemovePlayer(Player *plr, uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); bool SetupBattleGround(); + virtual void Reset(); + virtual void FillInitialWorldStates(WorldPacket &d, uint32& count); void HandleKillPlayer(Player* player, Player *killer); + bool HandlePlayerUnderMap(Player * plr); + private: + uint32 m_uiKnockback; }; #endif diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index e4715ea..1015832 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1485,8 +1485,8 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI //for arenas there is random map used if (bg_template->isArena()) { - BattleGroundTypeId arenas[] = {BATTLEGROUND_NA, BATTLEGROUND_BE, BATTLEGROUND_RL/*, BATTLEGROUND_DS, BATTLEGROUND_RV*/}; - uint32 arena_num = urand(0,2/*4*/); + BattleGroundTypeId arenas[] = {BATTLEGROUND_NA, BATTLEGROUND_BE, BATTLEGROUND_RL, BATTLEGROUND_DS/*, BATTLEGROUND_RV*/}; + uint32 arena_num = urand(0,3/*4*/); bgTypeId = arenas[arena_num]; bg_template = GetBattleGroundTemplate(bgTypeId); if (!bg_template) @@ -1897,7 +1897,8 @@ bool BattleGroundMgr::IsArenaType(BattleGroundTypeId bgTypeId) return ( bgTypeId == BATTLEGROUND_AA || bgTypeId == BATTLEGROUND_BE || bgTypeId == BATTLEGROUND_NA || - bgTypeId == BATTLEGROUND_RL ); + bgTypeId == BATTLEGROUND_RL || + bgTypeId == BATTLEGROUND_DS); } BattleGroundQueueTypeId BattleGroundMgr::BGQueueTypeId(BattleGroundTypeId bgTypeId, uint8 arenaType) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 0372f37..d31f19e 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -8381,6 +8381,16 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid) FillInitialWorldState(data,count,0xbba,0x0);// 9 show } break; + case 4378: // Dalaran Severs + if (bg && bg->GetTypeID(true) == BATTLEGROUND_DS) + bg->FillInitialWorldStates(data, count); + else + { + FillInitialWorldState(data,count,0xe11,0x0);// 7 gold + FillInitialWorldState(data,count,0xe10,0x0);// 8 green + FillInitialWorldState(data,count,0xe1a,0x0);// 9 show + } + break; case 3703: // Shattrath City break; default: diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 37abee6..3694295 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -14222,6 +14222,27 @@ void Unit::KnockBackFrom(Unit* target, float horizontalSpeed, float verticalSpee } } +void Unit::KnockBackPlayerWithAngle(float angle, float horizontalSpeed, float verticalSpeed) +{ + float vsin = sin(angle); + float vcos = cos(angle); + + // Effect propertly implemented only for players + if(GetTypeId()==TYPEID_PLAYER) + { + WorldPacket data(SMSG_MOVE_KNOCK_BACK, 8+4+4+4+4+4); + data << GetPackGUID(); + data << uint32(0); // Sequence + data << float(vcos); // x direction + data << float(vsin); // y direction + data << float(horizontalSpeed); // Horizontal speed + data << float(-verticalSpeed); // Z Movement speed (vertical) + ((Player*)this)->GetSession()->SendPacket(&data); + } + else + sLog.outError("KnockBackPlayer: Target of KnockBackPlayer must be player!"); +} + float Unit::GetCombatRatingReduction(CombatRating cr) const { if (GetTypeId() == TYPEID_PLAYER) diff --git a/src/game/Unit.h b/src/game/Unit.h index 4aaf7c3..2094a98 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1775,6 +1775,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject bool isHover() const { return HasAuraType(SPELL_AURA_HOVER); } void KnockBackFrom(Unit* target, float horizontalSpeed, float verticalSpeed); + void KnockBackPlayerWithAngle(float angle, float horizontalSpeed, float verticalSpeed); void _RemoveAllAuraMods(); void _ApplyAllAuraMods(); в базу.sql Code delete from `gameobject` where `map` = 617; insert into `gameobject` values -- buffs ('200060','184663','617','1','1','1291.7','813.424','7.11472','4.64562','0','0','0.730314','-0.683111','-120','100','1'), ('200061', '184664','617','1','1','1291.7','768.911','7.11472','1.55194','0','0','0.700409','0.713742','-120','100','1'), -- doors ('200062','192642','617','1','1','1350.95','817.2','21.4096','3.15','0','0','0.99627','0.0862864','86400','100','1'), ('200063','192 643','617','1','1','1232.65','764.913','21.4729','6.3','0','0','0.0310211','-0.999519','86400','100','1'); delete from `gameobject_battleground` where `guid` in (200060,200061,200062,200063); insert into `gameobject_battleground` values -- buffs ('200060','252','0'), ('200061','252','0'), -- doors ('200062','254','0'), ('200063','254','0'); delete from `battleground_events` where `map` = 617; insert into `battleground_events` values ('617','252','0','buffs'), ('617','254','0','doors'); -- doors update `gameobject_template` set `faction` = 114, `flags` = 32, `size` = 1.5 where `entry` in (192642,192643); Добавлено (26.07.2010, 10:40) 1.patch Code diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 1015832..08e60e6 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1476,8 +1476,8 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI //for arenas there is random map used if (bg_template->isArena()) { - BattleGroundTypeId arenas[] = {BATTLEGROUND_NA, BATTLEGROUND_BE, BATTLEGROUND_RL}; - uint32 arena_num = urand(0,2); + BattleGroundTypeId arenas[] = {BATTLEGROUND_NA, BATTLEGROUND_BE, BATTLEGROUND_RL, BATTLEGROUND_RV}; + uint32 arena_num = urand(0,3); bgTypeId = arenas[arena_num]; bg_template = GetBattleGroundTemplate(bgTypeId); if (!bg_template) @@ -1860,7 +1860,8 @@ bool BattleGroundMgr::IsArenaType(BattleGroundTypeId bgTypeId) return ( bgTypeId == BATTLEGROUND_AA || bgTypeId == BATTLEGROUND_BE || bgTypeId == BATTLEGROUND_NA || - bgTypeId == BATTLEGROUND_RL ); + bgTypeId == BATTLEGROUND_RL || + bgTypeId == BATTLEGROUND_RV ); } BattleGroundQueueTypeId BattleGroundMgr::BGQueueTypeId(BattleGroundTypeId bgTypeId, uint8 arenaType) diff --git a/src/game/BattleGroundRV.cpp b/src/game/BattleGroundRV.cpp index e54e4db..4cbe4a5 100644 --- a/src/game/BattleGroundRV.cpp +++ b/src/game/BattleGroundRV.cpp @@ -19,11 +19,13 @@ #include "Player.h" #include "BattleGround.h" #include "BattleGroundRV.h" +#include "ObjectMgr.h" +#include "WorldPacket.h" +#include "GameObject.h" #include "Language.h" BattleGroundRV::BattleGroundRV() { - m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M; m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S; m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; @@ -43,6 +45,24 @@ BattleGroundRV::~BattleGroundRV() void BattleGroundRV::Update(uint32 diff) { BattleGround::Update(diff); + if (GetStatus() == STATUS_IN_PROGRESS) + { + // teleport buggers + if(m_uiTeleport < diff) + { + for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) + { + Player * plr = sObjectMgr.GetPlayer(itr->first); + if (plr && plr->GetPositionZ() < 27) + plr->TeleportTo(618, plr->GetPositionX(), plr->GetPositionY(), 29, plr->GetOrientation(), false); + if (plr && plr->GetPositionZ() < 27) + plr->TeleportTo(618, plr->GetPositionX(), plr->GetPositionY(), 29, plr->GetOrientation(), false); + } + m_uiTeleport = 1000; + } + else + m_uiTeleport -= diff; + } } void BattleGroundRV::StartingEventCloseDoors() @@ -51,6 +71,7 @@ void BattleGroundRV::StartingEventCloseDoors() void BattleGroundRV::StartingEventOpenDoors() { + OpenDoorEvent(BG_EVENT_DOOR); } void BattleGroundRV::AddPlayer(Player *plr) @@ -60,19 +81,78 @@ void BattleGroundRV::AddPlayer(Player *plr) BattleGroundRVScore* sc = new BattleGroundRVScore; m_PlayerScores[plr->GetGUID()] = sc; + + UpdateWorldState(0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); + UpdateWorldState(0xe10, GetAlivePlayersCountByTeam(HORDE)); } void BattleGroundRV::RemovePlayer(Player * /*plr*/, uint64 /*guid*/) { + if (GetStatus() == STATUS_WAIT_LEAVE) + return; + + UpdateWorldState(0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); + UpdateWorldState(0xe10, GetAlivePlayersCountByTeam(HORDE)); + + CheckArenaWinConditions(); } void BattleGroundRV::HandleKillPlayer(Player* player, Player* killer) { + if (GetStatus() != STATUS_IN_PROGRESS) + return; + + if (!killer) + { + sLog.outError("BattleGroundRV: Killer player not found"); + return; + } + BattleGround::HandleKillPlayer(player, killer); + + UpdateWorldState(0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); + UpdateWorldState(0xe10, GetAlivePlayersCountByTeam(HORDE)); + + CheckArenaWinConditions(); +} + +bool BattleGroundRV::HandlePlayerUnderMap(Player *player) +{ + player->TeleportTo(GetMapId(), 763.5f, -284, 28.276f, player->GetOrientation(), false); + return true; +} + +void BattleGroundRV::HandleAreaTrigger(Player * Source, uint32 Trigger) +{ + if (GetStatus() != STATUS_IN_PROGRESS) + return; + + switch(Trigger) + { + case 5224: + case 5226: + case 5473: + case 5474: + break; + default: + sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); + break; + } +} + +void BattleGroundRV::FillInitialWorldStates(WorldPacket &data, uint32& count) +{ + FillInitialWorldState(data, count, 0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); + FillInitialWorldState(data, count, 0xe10, GetAlivePlayersCountByTeam(HORDE)); + FillInitialWorldState(data, count, 0xe1a, 1); } -void BattleGroundRV::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/) +void BattleGroundRV::Reset() { + //call parent's class reset + BattleGround::Reset(); + m_uiTeleport = 22000; } bool BattleGroundRV::SetupBattleGround() diff --git a/src/game/BattleGroundRV.h b/src/game/BattleGroundRV.h index d53dd23..d8bc665 100644 --- a/src/game/BattleGroundRV.h +++ b/src/game/BattleGroundRV.h @@ -45,6 +45,11 @@ class BattleGroundRV : public BattleGround void RemovePlayer(Player *plr, uint64 guid); void HandleAreaTrigger(Player *Source, uint32 Trigger); bool SetupBattleGround(); + virtual void Reset(); + virtual void FillInitialWorldStates(WorldPacket &d, uint32& count); void HandleKillPlayer(Player* player, Player *killer); + bool HandlePlayerUnderMap(Player * plr); + private: + uint32 m_uiTeleport; }; #endif diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 7748a59..880f80d 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -154,6 +154,13 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa ((InstanceMap*)map)->GetInstanceData()->OnObjectCreate(this); } + if (goinfo->type == GAMEOBJECT_TYPE_TRANSPORT) + { + SetUInt32Value(GAMEOBJECT_LEVEL, goinfo->transport.pause); + if (goinfo->transport.startOpen) + SetGoState(GO_STATE_ACTIVE); + } + return true; } @@ -672,6 +679,15 @@ bool GameObject::IsTransport() const return gInfo->type == GAMEOBJECT_TYPE_TRANSPORT || gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT; } +// is Dynamic transport = non-stop Transport +bool GameObject::IsDynTransport() const +{ + // If something is marked as a transport, don't transmit an out of range packet for it. + GameObjectInfo const * gInfo = GetGOInfo(); + if(!gInfo) return false; + return gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT || (gInfo->type == GAMEOBJECT_TYPE_TRANSPORT && !gInfo->transport.pause); +} + Unit* GameObject::GetOwner() const { return ObjectAccessor::GetUnit(*this, GetOwnerGUID()); diff --git a/src/game/GameObject.h b/src/game/GameObject.h index 0e48cb7..9969a6e 100644 --- a/src/game/GameObject.h +++ b/src/game/GameObject.h @@ -590,6 +590,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject GameObjectInfo const* GetGOInfo() const; bool IsTransport() const; + bool IsDynTransport() const; uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; } diff --git a/src/game/Object.cpp b/src/game/Object.cpp index c0a36c4..cd40765 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -541,7 +541,7 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask * bool IsPerCasterAuraState = false; if (updatetype == UPDATETYPE_CREATE_OBJECT || updatetype == UPDATETYPE_CREATE_OBJECT2) { - if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport()) + if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsDynTransport()) { if ( ((GameObject*)this)->ActivateToQuest(target) || target->isGameMaster()) IsActivateToQuest = true; @@ -559,7 +559,7 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask * } else // case UPDATETYPE_VALUES { - if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport()) + if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsDynTransport()) { if ( ((GameObject*)this)->ActivateToQuest(target) || target->isGameMaster()) { diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 0e5f522..89c5515 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -8395,6 +8395,16 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid) FillInitialWorldState(data,count,0xe1a,0x0);// 9 show } break; + case 4406: // Ring of Valor + if (bg && bg->GetTypeID(true) == BATTLEGROUND_RV) + bg->FillInitialWorldStates(data, count); + else + { + FillInitialWorldState(data,count,0xe11,0x0);// 7 gold + FillInitialWorldState(data,count,0xe10,0x0);// 8 green + FillInitialWorldState(data,count,0xe1a,0x0);// 9 show + } + break; case 3703: // Shattrath City break; default: в базу.sql Code delete from `gameobject` where `map` = 618; insert into `gameobject` values -- buffs ('200070','184663','618','1','1','735.551819','-284.794678','28.276682','0.034906','0','0','0','0','-120','100','1'), ('200071','184 664','618','1','1','791.224487','-284.794464','28.276682','2.600535','0','0','0','0','-120','100','1'), -- elevators ('200072','194582','618','1','1','763.536377','-294.535767','0.505383','3.141593','0','0','0','0','120','100','1'), ('200073','1 94586','618','1','1','763.506348','-273.873352','0.505383','0','0','0','0','0','120','100','1'), -- fire ('200074','192704','618','1','1','743.543457','-283.799469','28.286655','0','0','0','0','0','120','100','1'), ('200075','192705','618 ','1','1','782.971802','-283.799469','28.286655','0','0','0','0','0','120','100','1'), ('200076','192388','618','1','1','743.711060','-284. 099609','27.542587','3.141593','0','0','0','0','120','100','1'), ('200077','192387','618','1','1','783.221252','-284.133362','27.535686','0 ','0','0','0','0','120','100','1'), -- gears ('200078','192393','618','1','1','763.664551','-261.872986','26.686588','0','0','0','0','0','120','100','1'), ('200079','192394','61 8','1','1','763.578979','-306.146149','26.665222','3.141593','0','0','0','0','120','100','1'), -- pillars ('200080','194583','618','1','1','763.632385','-306.162384','25.909504','3.141593','0','0','0','0','120','100','1'), ('200081','19 4584','618','1','1','723.644287','-284.493256','24.648525','3.141593','0','0','0','0','120','100','1'), ('200082','194585','618','1','1','7 63.611145','-261.856750','25.909504','0','0','0','0','0','120','100','1'), ('200083','194587','618','1','1','802.211609','-284.493256','24. 648525','0','0','0','0','0','120','100','1'), /* -- pillars collision (not work - should make you break LoS) ('200084','194580','618','1','1','763.632385','-306.162384','30.639660','3.141593','0','0','0','0','120','100','1'), ('200085','19457 9','618','1','1','723.644287','-284.493256','32.382710','0','0','0','0','0','120','100','1'), ('200086','194581','618','1','1','763.611145' ,'-261.856750','30.639660','0','0','0','0','0','120','100','1'), ('200087','194578','618','1','1','802.211609','-284.493256','32.382710','3 .141593','0','0','0','0','120','100','1'); */ -- pulley ('200088','192389','618','1','1','700.722290','-283.990662','39.517582','3.141593','0','0','0','0','120','100','1'), ('200089','192 390','618','1','1','826.303833','-283.996429','39.517582','0','0','0','0','0','120','100','1'); delete from `gameobject_battleground` where `guid` in (200070,200071,200072,200073); insert into `gameobject_battleground` values -- buffs ('200070','252','0'), ('200071','252','0'), -- elevators ('200072','254','0'), ('200073','254','0'); delete from `battleground_events` where `map` = 618; insert into `battleground_events` values ('618','252','0','buffs'), ('618','254','0','doors'); update `gameobject_template` set `faction` = 114, `flags` = 32 where `entry` in (192704,192705,192388,192387,192393,192394,192389,192390); Добавлено (26.07.2010, 10:43) |
вот дополнения для Арены Даларана от Wowka реализует работу стока воды в центре:
Code diff --git a/addition/dalaran_arena.sql b/addition/dalaran_arena.sql index 46499eb..bda5761 100644 --- a/addition/dalaran_arena.sql +++ b/addition/dalaran_arena.sql @@ -1,23 +1,34 @@ -#Dalaran Arena +delete from `gameobject` where `map` = 617; insert into `gameobject` values -- buffs -('200060','184663','617','1','1','1291.7','813.424','7.11472','4.64562','0','0','0.730314','-0.683111','120','100','1'), -('200061' ,'184664','617','1','1','1291.7','768.911','7.11472','1.55194','0','0','0.700409','0.713742','120','100','1'), +('200060','184663','617','1 ','1','1291.7','813.424','7.11472','4.64562','0','0','0.730314','-0.683111','-120','100','1'), +('200061','184664','617','1','1','1291.7',' 768.911','7.11472','1.55194','0','0','0.700409','0.713742','-120','100','1'), -- doors ('200062','192642','617','1','1','1350.95','817.2','21.4096','3.15','0','0','0.99627','0.0862864','86400','100','1'), -('200063','192643',' 617','1','1','1232.65','764.913','21.4729','6.3','0','0','0.0310211','-0.999519','86400','100','1'); - +('200063','192643','617','1','1','1232.65','764.913','21.4729','6.3','0','0','0.0310211','-0.999519','86400','100','1'), +-- waterfall +('200064','194395','617','1','1', 1291.6, 791.05, 7.11, 3.22012 ,'0','0', 0.999229, -0.0392542 ,'-120','100','1'), +('200065','191877','617','1','1', 1291.6, 791.05, 7.11, 3.22012 ,'0','0', 0.999229, -0.0392542 ,'-120','100','1'); + + +delete from `gameobject_battleground` where `guid` in (200060,200061,200062,200063,200064,200065); insert into `gameobject_battleground` values -- buffs ('200060','252','0'), ('200061','252','0'), -- doors ('200062','254','0'), -('200063','254','0'); - +('200063','254','0'), +-- waterfall +('200064','250','0'), +('200065','250','0'); + + +delete from `battleground_events` where `map` = 617; insert into `battleground_events` values ('617','252','0','buffs'), -('617','254','0','doors'); - +('617','254','0','doors'), +('617','250','0','waterfall'); + -- doors -update gameobject_template set faction=114,flags=32,size = 1.5 where entry in (192642,192643); \ No newline at end of file +update `gameobject_template` set `faction` = 114, `flags` = 32, `size` = 1.5 where `entry` in (192642,192643); diff --git a/src/game/BattleGroundDS.cpp b/src/game/BattleGroundDS.cpp index 56f3e8e..f4f3533 100644 --- a/src/game/BattleGroundDS.cpp +++ b/src/game/BattleGroundDS.cpp @@ -106,6 +106,31 @@ void BattleGroundDS::Update(uint32 diff) } }else m_uiFall -= diff; + + // Waterfall + if(m_uiWaterfall < diff) + { + if(WaterfallActivated) + { + SpawnEvent(WATERFALL_EVENT, 0, false); + WaterfallActivated = false; + } + else + { + SpawnEvent(WATERFALL_EVENT, 0, true); + WaterfallActivated = true; + + for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) + { + Player * plr = sObjectMgr.GetPlayer(itr->first); + if (plr && plr->GetDistance2d(1291, 790) <= 6) + plr->KnockBackFrom(plr, -20.0f, 9.0f); + } + } + m_uiWaterfall = urand(30,45)*IN_MILLISECONDS; + + }else m_uiWaterfall -= diff; + } } @@ -197,6 +222,8 @@ void BattleGroundDS::Reset() m_uiKnockback = 2000; KnockbackCheck = true; m_uiFall = 8000; + WaterfallActivated = false; + m_uiWaterfall = 2000; } bool BattleGroundDS::SetupBattleGround() diff --git a/src/game/BattleGroundDS.h b/src/game/BattleGroundDS.h index e2acea3..f6d0986 100644 --- a/src/game/BattleGroundDS.h +++ b/src/game/BattleGroundDS.h @@ -17,6 +17,7 @@ */ #ifndef __BATTLEGROUNDDS_H #define __BATTLEGROUNDDS_H +#define WATERFALL_EVENT 250 class BattleGround; @@ -52,8 +53,10 @@ class BattleGroundDS : public BattleGround bool HandlePlayerUnderMap(Player * plr); bool TeleportCheck; bool KnockbackCheck; + bool WaterfallActivated; uint32 m_uiTeleport; uint32 m_uiKnockback; uint32 m_uiFall; + uint32 m_uiWaterfall; }; #endif
Сообщение # 6 написано 09.08.2010 в 15:15
|
Данная тема была перемещена из раздела Патчи в ядро MaNGOS.
Причина перемещения: устарело Переместил: ph3n.
Сообщение # 10 написано 15.10.2012 в 16:38
|
| |||
| |||

благо мне повезло досталась лицензионная