diff options
author | Anubisss <none@none> | 2009-05-19 21:03:43 +0200 |
---|---|---|
committer | Anubisss <none@none> | 2009-05-19 21:03:43 +0200 |
commit | b0ea9c589a0c64d6a5699d3dbce47e43fe7ae14b (patch) | |
tree | bde7e5e2b00ce1349040937f99b7c09db5a25b5a /src/bindings/scripts | |
parent | e348b671e7cbe8ce328a4bf07c635328a4accb3c (diff) |
*Merge SD2.
*r968: Adjust some scripts to use SetEquipmentSlots()
*r969: Made a few corrections to EventAI.txt
*r970: Added ScriptedAI function SetCombatMovement() for future use/development.
*r971: Small adjustments to escortAI, remove some useless code and always use current WaitTimer if not already 0 after return to last known waypoint.
*r972: Added support for quest 1651
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts')
7 files changed, 221 insertions, 63 deletions
diff --git a/src/bindings/scripts/docs/EventAI.txt b/src/bindings/scripts/docs/EventAI.txt index 3dac5c271e8..6bad6050c77 100644 --- a/src/bindings/scripts/docs/EventAI.txt +++ b/src/bindings/scripts/docs/EventAI.txt @@ -231,13 +231,13 @@ This Event is commonly used for NPC's who have Ranged Combat and will Throw/Shoo --------------------- 10 = EVENT_T_OOC_LOS: --------------------- -Parameter 1: NoHostile - This Value is to Prevent this Action from Expiring When Caused by a Player/Creature Hostile to them (0 = Prevent Event from Expiring, 1 = Allow Event to Expire) -Parameter 2: NoFriendly - This Value is to Prevent this Action from Expiring When Caused by a Player/Creature Friendly to them (0 = Prevent Event from Expiring, 1 = Allow Event to Expire) +Parameter 1: Hostile-or-Not - This will expire if Unit are hostile. If Param1=1 it will only expire if Unit are not Hostile(generally determined by faction) +Parameter 2: MaxAllowedRange - Expires when a Unit moves within this distance to creature Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire -OUT OF COMBAT ONLY! - Expires when a Player moves within visible distance to the NPC. Does not expire for Hostile Players if (Param1) is not 0. Does not expire for Friendly Players if (Param2) is not 0. Will repeat every (Param3) and (Param4). Does not expire for creatures or pets when they are in combat. -This Event is commonly used for NPC's who Do Something or Say Something when you walk past them Out of Combat. +OUT OF COMBAT! +This Event is commonly used for NPC's who do something or say something to you when you walk past them Out of Comba --------------------- 11 = EVENT_T_SPAWNED: diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index 6ab54b95428..e22157cd28c 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -79,7 +79,7 @@ void SummonList::DespawnAll() } } -ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false) +ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false), CombatMovement(true) { HeroicMode = m_creature->GetMap()->IsHeroic(); } @@ -607,6 +607,11 @@ void ScriptedAI::SetSheathState(SheathState newState) m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, newState); } +void ScriptedAI::SetCombatMovement(bool CombatMove) +{ + CombatMovement = CombatMove; +} + /*void Scripted_NoMovementAI::MoveInLineOfSight(Unit *who) { if( !m_creature->getVictim() && m_creature->canAttack(who) && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) ) diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h index dc1b8f6144f..7ce9e7e18ff 100644 --- a/src/bindings/scripts/include/sc_creature.h +++ b/src/bindings/scripts/include/sc_creature.h @@ -188,6 +188,11 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE); void SetSheathState(SheathState newState); + + void SetCombatMovement(bool CombatMove); + + protected: + bool CombatMovement; }; struct TRINITY_DLL_DECL Scripted_NoMovementAI : public ScriptedAI diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp index 855dd7f0d05..74cdb850bac 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp @@ -495,10 +495,10 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI if(spell->Id == SPELL_GLAIVE_RETURNS) // Re-equip our warblades! { if(!m_creature->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID)) - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 45479); + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); else - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 45481); - m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE ); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); } } @@ -574,8 +574,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI Timer[EVENT_FLIGHT_SEQUENCE] = 700; break; case 4://throw another - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); { uint8 i=0; Creature* Glaive = m_creature->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -660,14 +659,14 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI if(DemonTransformation[TransformCount].equip) { - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 45479); // Requip warglaives if needed - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 45481); + // Requip warglaives if needed + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE ); } else { - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+0, 0); // Unequip warglaives if needed - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); + // Unequip warglaives if needed + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); } switch(TransformCount) @@ -1385,8 +1384,7 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI Timer[EVENT_MAIEV_STEALTH] = 0; Timer[EVENT_MAIEV_TAUNT] = 22000 + rand()%21 * 1000; Timer[EVENT_MAIEV_SHADOW_STRIKE] = 30000; - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 44850); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 0); + SetEquipmentSlots(false, 44850, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, 45738); } @@ -1842,8 +1840,7 @@ void boss_illidan_stormrageAI::Reset() m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); m_creature->setActive(false); Summons.DespawnAll(); @@ -1900,8 +1897,8 @@ void boss_illidan_stormrageAI::HandleTalkSequence() m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); break; case 8: - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 45479); // Equip our warglaives! - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 45481); + // Equip our warglaives! + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE ); m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break; diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp index 0d24d4002dd..882fbe7b7da 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp @@ -67,32 +67,31 @@ static InfernalPoint InfernalPoints[] = {-10935.7, -1996.0} }; -#define TOTAL_INFERNAL_POINTS 18 +#define TOTAL_INFERNAL_POINTS 18 //Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends //Along with reducing healing and regen while enfeebled to 0% //This spell effect will only reduce healing -#define SPELL_ENFEEBLE 30843 //Enfeeble during phase 1 and 2 -#define SPELL_ENFEEBLE_EFFECT 41624 +#define SPELL_ENFEEBLE 30843 //Enfeeble during phase 1 and 2 +#define SPELL_ENFEEBLE_EFFECT 41624 -#define SPELL_SHADOWNOVA 30852 //Shadownova used during all phases -#define SPELL_SW_PAIN 30854 //Shadow word pain during phase 1 and 3 (different targeting rules though) -#define SPELL_THRASH_PASSIVE 12787 //Extra attack chance during phase 2 -#define SPELL_SUNDER_ARMOR 30901 //Sunder armor during phase 2 -#define SPELL_THRASH_AURA 12787 //Passive proc chance for thrash -#define SPELL_EQUIP_AXES 30857 //Visual for axe equiping -#define SPELL_AMPLIFY_DAMAGE 39095 //Amplifiy during phase 3 -#define SPELL_CLEAVE 30131 //Same as Nightbane. -#define SPELL_HELLFIRE 30859 //Infenals' hellfire aura -#define NETHERSPITE_INFERNAL 17646 //The netherspite infernal creature -#define MALCHEZARS_AXE 17650 //Malchezar's axes (creatures), summoned during phase 3 +#define SPELL_SHADOWNOVA 30852 //Shadownova used during all phases +#define SPELL_SW_PAIN 30854 //Shadow word pain during phase 1 and 3 (different targeting rules though) +#define SPELL_THRASH_PASSIVE 12787 //Extra attack chance during phase 2 +#define SPELL_SUNDER_ARMOR 30901 //Sunder armor during phase 2 +#define SPELL_THRASH_AURA 12787 //Passive proc chance for thrash +#define SPELL_EQUIP_AXES 30857 //Visual for axe equiping +#define SPELL_AMPLIFY_DAMAGE 39095 //Amplifiy during phase 3 +#define SPELL_CLEAVE 30131 //Same as Nightbane. +#define SPELL_HELLFIRE 30859 //Infenals' hellfire aura +#define NETHERSPITE_INFERNAL 17646 //The netherspite infernal creature +#define MALCHEZARS_AXE 17650 //Malchezar's axes (creatures), summoned during phase 3 -#define INFERNAL_MODEL_INVISIBLE 11686 //Infernal Effects -#define SPELL_INFERNAL_RELAY 30834 +#define INFERNAL_MODEL_INVISIBLE 11686 //Infernal Effects +#define SPELL_INFERNAL_RELAY 30834 -#define AXE_EQUIP_MODEL 40066 //Axes info -#define AXE_EQUIP_INFO 33448898 +#define EQUIP_ID_AXE 33542 //Axes info //---------Infernal code first struct TRINITY_DLL_DECL netherspite_infernalAI : public ScriptedAI @@ -291,11 +290,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI void ClearWeapons() { - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); - //m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, 0); - - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); - //m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, 0); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); //damage const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); @@ -435,11 +430,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI m_creature->CastSpell(m_creature, SPELL_THRASH_AURA, true); //models - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, AXE_EQUIP_MODEL); - //m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, AXE_EQUIP_INFO); - - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, AXE_EQUIP_MODEL); - //m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, AXE_EQUIP_INFO); + SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE, EQUIP_NO_CHANGE); //damage const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); @@ -477,9 +468,6 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI Creature *axe = m_creature->SummonCreature(MALCHEZARS_AXE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); if(axe) { - axe->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, AXE_EQUIP_MODEL); - //axe->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, AXE_EQUIP_INFO); - axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); axe->setFaction(m_creature->getFaction()); axes[i] = axe->GetGUID(); diff --git a/src/bindings/scripts/scripts/zone/westfall/westfall.cpp b/src/bindings/scripts/scripts/zone/westfall/westfall.cpp index a865b763ae5..083820e7df9 100644 --- a/src/bindings/scripts/scripts/zone/westfall/westfall.cpp +++ b/src/bindings/scripts/scripts/zone/westfall/westfall.cpp @@ -17,17 +17,173 @@ /* ScriptData SDName: Westfall SD%Complete: 90 -SDComment: Quest support: 155 +SDComment: Quest support: 155, 1651 SDCategory: Westfall EndScriptData */ /* ContentData +npc_daphne_stilwell npc_defias_traitor EndContentData */ #include "precompiled.h" #include "../../npc/npc_escortAI.h" +/*###### +## npc_daphne_stilwell +######*/ + +enum +{ + SAY_DS_START = -1000402, + SAY_DS_DOWN_1 = -1000403, + SAY_DS_DOWN_2 = -1000404, + SAY_DS_DOWN_3 = -1000405, + SAY_DS_PROLOGUE = -1000406, + + SPELL_SHOOT = 6660, + QUEST_TOME_VALOR = 1651, + NPC_DEFIAS_RAIDER = 6180, + EQUIP_ID_RIFLE = 2511 +}; + +struct TRINITY_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI +{ + npc_daphne_stilwellAI(Creature* pCreature) : npc_escortAI(pCreature) {} + + uint32 uiWPHolder; + uint32 uiShootTimer; + + void Reset() + { + if (IsBeingEscorted) + { + switch(uiWPHolder) + { + case 7: DoScriptText(SAY_DS_DOWN_1, m_creature); break; + case 8: DoScriptText(SAY_DS_DOWN_2, m_creature); break; + case 9: DoScriptText(SAY_DS_DOWN_3, m_creature); break; + } + } + else + uiWPHolder = 0; + + uiShootTimer = 0; + } + + void WaypointReached(uint32 uiPoint) + { + Player* pPlayer = Unit::GetPlayer(PlayerGUID); + + if (!pPlayer) + return; + + uiWPHolder = uiPoint; + + switch(uiPoint) + { + case 4: + SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE); + SetSheathState(SHEATH_STATE_RANGED); + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + break; + case 6: + SetCombatMovement(false); + break; + case 7: + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 8: + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037, 1570.213, 54.961, 4.283, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 9: + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037, 1570.213, 54.961, 4.283, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.018, 1570.738, 54.828, 4.220, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 10: + SetRun(false); + break; + case 11: + DoScriptText(SAY_DS_PROLOGUE, m_creature); + break; + case 13: + SetSheathState(SHEATH_STATE_UNARMED); + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + SetEquipmentSlots(true); + break; + case 17: + pPlayer->GroupEventHappens(QUEST_TOME_VALOR, m_creature); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void JustDied(Unit* killer) + { + if (Player* pPlayer = Unit::GetPlayer(PlayerGUID)) + { + if (pPlayer->GetQuestStatus(QUEST_TOME_VALOR) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(QUEST_TOME_VALOR); + } + } + + void Update(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + + if(!UpdateVictim()) + return; + + if (uiShootTimer < diff) + { + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + SetCombatMovement(true); + else + SetCombatMovement(false); + + uiShootTimer = 1500; + + DoCast(m_creature->getVictim(), SPELL_SHOOT); + }else uiShootTimer -= diff; + } +}; + +bool QuestAccept_npc_daphne_stilwell(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_TOME_VALOR) + { + DoScriptText(SAY_DS_START, pCreature); + ((npc_escortAI*)(pCreature->AI()))->Start(true, true, true, pPlayer->GetGUID()); + } + + return true; +} + +CreatureAI* GetAI_npc_daphne_stilwell(Creature* pCreature) +{ + npc_daphne_stilwellAI* thisAI = new npc_daphne_stilwellAI(pCreature); + + thisAI->FillPointMovementListForCreature(); + + return (CreatureAI*)thisAI; +} + +/*###### +## npc_defias_traitor +######*/ + #define SAY_START -1000101 #define SAY_PROGRESS -1000102 #define SAY_END -1000103 @@ -116,6 +272,12 @@ void AddSC_westfall() Script *newscript; newscript = new Script; + newscript->Name = "npc_daphne_stilwell"; + newscript->GetAI = &GetAI_npc_daphne_stilwell; + newscript->pQuestAccept = &QuestAccept_npc_daphne_stilwell; + newscript->RegisterSelf(); + + newscript = new Script; newscript->Name="npc_defias_traitor"; newscript->GetAI = &GetAI_npc_defias_traitor; newscript->pQuestAccept = &QuestAccept_npc_defias_traitor; diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp index 9881555aaf3..54cda57d9f9 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp @@ -24,8 +24,10 @@ EndScriptData */ #include "precompiled.h" #include "def_zulgurub.h" -#define SPELL_AMBUSH 24337 -#define SPELL_THOUSANDBLADES 24649 +#define SPELL_AMBUSH 24337 +#define SPELL_THOUSANDBLADES 24649 + +#define EQUIP_ID_MAIN_HAND 0 //was item display id 31818, but this id does not exist struct TRINITY_DLL_DECL boss_renatakiAI : public ScriptedAI { @@ -65,11 +67,11 @@ struct TRINITY_DLL_DECL boss_renatakiAI : public ScriptedAI if (Invisible_Timer < diff) { m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); - m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_SLOT_ID, 0); - //m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_INFO , 218171138); - //m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_INFO + 1, 3); + + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + m_creature->SetDisplayId(11686); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11686); Invisible = true; Invisible_Timer = 15000 + rand()%15000; @@ -97,11 +99,10 @@ struct TRINITY_DLL_DECL boss_renatakiAI : public ScriptedAI if (Visible_Timer < diff) { m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); - m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15268); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_SLOT_ID, 31818); - //m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_INFO , 218171138); - //m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_INFO + 1, 3); + + m_creature->SetDisplayId(15268); + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Invisible = false; |