diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h | 1 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp | 113 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 2 | ||||
-rw-r--r-- | src/game/Transports.cpp | 23 | ||||
-rw-r--r-- | src/game/Transports.h | 3 | ||||
-rw-r--r-- | src/game/Unit.cpp | 20 |
6 files changed, 135 insertions, 27 deletions
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h index 04daa79ffac..975a97dcfae 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h @@ -26,4 +26,5 @@ #define DATA_FATHOMLORDKARATHRESSEVENT 19 #define DATA_LEOTHERAS 20 #define DATA_LEOTHERAS_EVENT_STARTER 21 +#define DATA_CONTROL_CONSOLE 22 #endif diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp index 25b6a1a54d5..ee4db2259a7 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp @@ -35,9 +35,22 @@ EndScriptData */ 5 - Lady Vashj Event */ +bool GOHello_go_bridge_console(Player *player, GameObject* _GO) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)_GO->GetInstanceData(); + + if(!pInstance) + return false; + + if (pInstance) + pInstance->SetData(DATA_CONTROL_CONSOLE, DONE); + + return true; +} + struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance { - instance_serpentshrine_cavern(Map *Map) : ScriptedInstance(Map) {Initialize();}; + instance_serpentshrine_cavern(Map *map) : ScriptedInstance(map) {Initialize();}; uint64 LurkerBelow; uint64 Sharkkis; @@ -46,12 +59,13 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance uint64 LadyVashj; uint64 Karathress; uint64 KarathressEvent_Starter; - uint64 LeotherasTheBlind; uint64 LeotherasEventStarter; - bool ShieldGeneratorDeactivated[4]; + uint64 ControlConsole; + uint64 BridgePart[3]; + bool ShieldGeneratorDeactivated[4]; bool Encounters[ENCOUNTERS]; void Initialize() @@ -63,10 +77,14 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance LadyVashj = 0; Karathress = 0; KarathressEvent_Starter = 0; - LeotherasTheBlind = 0; LeotherasEventStarter = 0; + ControlConsole = 0; + BridgePart[0] = 0; + BridgePart[1] = 0; + BridgePart[2] = 0; + ShieldGeneratorDeactivated[0] = false; ShieldGeneratorDeactivated[1] = false; ShieldGeneratorDeactivated[2] = false; @@ -84,6 +102,38 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance return false; } + void OnObjectCreate(GameObject *go) + { + switch(go->GetEntry()) + { + case 184568: + ControlConsole = go->GetGUID(); + go->setActive(true); + break; + + case 184203: + BridgePart[0] = go->GetGUID(); + go->setActive(true); + break; + + case 184204: + BridgePart[1] = go->GetGUID(); + go->setActive(true); + break; + + case 184205: + BridgePart[2] = go->GetGUID(); + go->setActive(true); + break; + } + } + + void OpenDoor(uint64 DoorGUID, bool open) + { + if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) + Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); + } + void OnCreatureCreate(Creature *creature, uint32 creature_entry) { switch(creature_entry) @@ -126,26 +176,35 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance { switch(type) { - case DATA_HYDROSSTHEUNSTABLEEVENT: Encounters[0] = data; break; - case DATA_LEOTHERASTHEBLINDEVENT: Encounters[1] = data; break; - case DATA_THELURKERBELOWEVENT: Encounters[2] = data; break; - case DATA_KARATHRESSEVENT: Encounters[3] = data; break; - case DATA_MOROGRIMTIDEWALKEREVENT: Encounters[4] = data; break; - //Lady Vashj - case DATA_LADYVASHJEVENT: - if(data == NOT_STARTED) - { - ShieldGeneratorDeactivated[0] = false; - ShieldGeneratorDeactivated[1] = false; - ShieldGeneratorDeactivated[2] = false; - ShieldGeneratorDeactivated[3] = false; - } - Encounters[5] = data; break; - case DATA_SHIELDGENERATOR1:ShieldGeneratorDeactivated[0] = (data) ? true : false; break; - case DATA_SHIELDGENERATOR2:ShieldGeneratorDeactivated[1] = (data) ? true : false; break; - case DATA_SHIELDGENERATOR3:ShieldGeneratorDeactivated[2] = (data) ? true : false; break; - case DATA_SHIELDGENERATOR4:ShieldGeneratorDeactivated[3] = (data) ? true : false; break; - } + case DATA_CONTROL_CONSOLE: + if(data = DONE) + { + OpenDoor(BridgePart[0], true); + OpenDoor(BridgePart[1], true); + OpenDoor(BridgePart[2], true); + } + ControlConsole = data; + case DATA_HYDROSSTHEUNSTABLEEVENT: Encounters[0] = data; break; + case DATA_LEOTHERASTHEBLINDEVENT: Encounters[1] = data; break; + case DATA_THELURKERBELOWEVENT: Encounters[2] = data; break; + case DATA_KARATHRESSEVENT: Encounters[3] = data; break; + case DATA_MOROGRIMTIDEWALKEREVENT: Encounters[4] = data; break; + //Lady Vashj + case DATA_LADYVASHJEVENT: + if(data == NOT_STARTED) + { + ShieldGeneratorDeactivated[0] = false; + ShieldGeneratorDeactivated[1] = false; + ShieldGeneratorDeactivated[2] = false; + ShieldGeneratorDeactivated[3] = false; + } + Encounters[5] = data; break; + case DATA_SHIELDGENERATOR1:ShieldGeneratorDeactivated[0] = (data) ? true : false; break; + case DATA_SHIELDGENERATOR2:ShieldGeneratorDeactivated[1] = (data) ? true : false; break; + case DATA_SHIELDGENERATOR3:ShieldGeneratorDeactivated[2] = (data) ? true : false; break; + case DATA_SHIELDGENERATOR4:ShieldGeneratorDeactivated[3] = (data) ? true : false; break; + } + if(data = DONE) SaveToDB(); } @@ -212,8 +271,14 @@ InstanceData* GetInstanceData_instance_serpentshrine_cavern(Map* map) void AddSC_instance_serpentshrine_cavern() { Script *newscript; + newscript = new Script; newscript->Name = "instance_serpent_shrine"; newscript->GetInstanceData = GetInstanceData_instance_serpentshrine_cavern; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="go_bridge_console"; + newscript->pGOHello = &GOHello_go_bridge_console; + newscript->RegisterSelf(); } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 9dd386ef918..64ef8c2baf2 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1238,7 +1238,7 @@ void Spell::EffectDummy(uint32 i) if(!unitTarget) return; - int32 basePoints0 = damage+int32(m_caster->GetPower(POWER_RAGE) * m_spellInfo->DmgMultiplier[i]); + int32 basePoints0 = damage+int32(m_caster->GetPower(POWER_RAGE) * m_spellInfo->DmgMultiplier[i] m); m_caster->CastCustomSpell(unitTarget, 20647, &basePoints0, NULL, NULL, true, 0); m_caster->SetPower(POWER_RAGE,0); return; diff --git a/src/game/Transports.cpp b/src/game/Transports.cpp index 2125fcf0567..21d3d3b1f27 100644 --- a/src/game/Transports.cpp +++ b/src/game/Transports.cpp @@ -400,6 +400,9 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids) // sLog.outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport); + if(keyFrames[i+1].delay > 5) + pos.delayed = true; + //if (teleport) m_WayPoints[t] = pos; @@ -504,6 +507,26 @@ void Transport::Update(uint32 /*p_time*/) Relocate(m_curr->second.x, m_curr->second.y, m_curr->second.z); } + if(m_curr->second.delayed) + { + switch (GetEntry()) + { + case 176495: + case 164871: + case 175080: + SendPlaySound(11804, false); break; // ZeppelinDocked + case 20808: + case 181646: + case 176231: + case 176244: + case 176310: + case 177233: + SendPlaySound(5495, false);break; // BoatDockingWarning + default: + SendPlaySound(5154, false); break; // ShipDocked + } + } + /* for(PlayerSet::iterator itr = m_passengers.begin(); itr != m_passengers.end();) { diff --git a/src/game/Transports.h b/src/game/Transports.h index 482ec16352a..0e39d57c089 100644 --- a/src/game/Transports.h +++ b/src/game/Transports.h @@ -88,12 +88,13 @@ class Transport : private GameObject { WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false) {} WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport) : - mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport) {} + mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), delayed(false) {} uint32 mapid; float x; float y; float z; bool teleport; + bool delayed; }; typedef std::map<uint32, WayPoint> WayPointMap; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4cd1eb5426a..f7e02f1469c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8599,6 +8599,17 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 switch(spellProto->SpellFamilyName) { + case SPELLFAMILY_GENERIC: + // Siphon Essence - 0% + if(spellProto->AttributesEx == 268435456 && spellProto->SpellIconID == 2027) + { + CastingTime = 0; + } + // Goblin Rocket Launcher - 0% + else if (spellProto->SpellIconID == 184 && spellProto->Attributes == 4259840) + { + CastingTime = 0; + } case SPELLFAMILY_MAGE: // Ignite - do not modify, it is (8*Rank)% damage of procing Spell if(spellProto->Id==12654) @@ -9021,7 +9032,8 @@ uint32 Unit::SpellHealingBonus(SpellEntry const *spellProto, uint32 healamount, // These Spells are doing fixed amount of healing (TODO found less hack-like check) if (spellProto->Id == 15290 || spellProto->Id == 39373 || spellProto->Id == 33778 || spellProto->Id == 379 || - spellProto->Id == 38395 || spellProto->Id == 40972) + spellProto->Id == 38395 || spellProto->Id == 40972 || + spellProto->Id == 22845) return healamount; int32 AdvertisedBenefit = SpellBaseHealingBonus(GetSpellSchoolMask(spellProto)); @@ -9125,6 +9137,12 @@ uint32 Unit::SpellHealingBonus(SpellEntry const *spellProto, uint32 healamount, DotFactor = damagetype == DOT ? 0.705f : 1.0f; CastingTime = damagetype == DOT ? 3500 : 1010; } + // Improved Leader of the Pack + else if (spellProto->AttributesEx2 == 536870912 && spellProto->SpellIconID == 312 + && spellProto->AttributesEx3 == 33554432) + { + CastingTime = 0; + } break; case SPELLFAMILY_PRIEST: // Holy Nova - 14% |