converted all tabs to 4 spaces
This commit is contained in:
parent
52f305111c
commit
f6eefedcd5
717 changed files with 132388 additions and 132388 deletions
|
|
@ -13,25 +13,25 @@ REWRITTEN FROM SCRATCH BY PUSSYWIZARD, IT OWNS NOW!
|
|||
|
||||
enum DrakeGiverTexts
|
||||
{
|
||||
GOSSIP_TEXTID_DRAKES = 13267,
|
||||
GOSSIP_TEXTID_BELGARISTRASZ1 = 12916,
|
||||
GOSSIP_TEXTID_BELGARISTRASZ2 = 13466,
|
||||
GOSSIP_TEXTID_BELGARISTRASZ3 = 13254,
|
||||
GOSSIP_TEXTID_VERDISA1 = 1,
|
||||
GOSSIP_TEXTID_VERDISA2 = 1,
|
||||
GOSSIP_TEXTID_VERDISA3 = 1,
|
||||
GOSSIP_TEXTID_ETERNOS1 = 1,
|
||||
GOSSIP_TEXTID_ETERNOS2 = 1,
|
||||
GOSSIP_TEXTID_ETERNOS3 = 13256,
|
||||
GOSSIP_TEXTID_DRAKES = 13267,
|
||||
GOSSIP_TEXTID_BELGARISTRASZ1 = 12916,
|
||||
GOSSIP_TEXTID_BELGARISTRASZ2 = 13466,
|
||||
GOSSIP_TEXTID_BELGARISTRASZ3 = 13254,
|
||||
GOSSIP_TEXTID_VERDISA1 = 1,
|
||||
GOSSIP_TEXTID_VERDISA2 = 1,
|
||||
GOSSIP_TEXTID_VERDISA3 = 1,
|
||||
GOSSIP_TEXTID_ETERNOS1 = 1,
|
||||
GOSSIP_TEXTID_ETERNOS2 = 1,
|
||||
GOSSIP_TEXTID_ETERNOS3 = 13256,
|
||||
};
|
||||
|
||||
#define GOSSIP_ITEM_DRAKES "So where do we go from here?"
|
||||
#define GOSSIP_ITEM_BELGARISTRASZ1 "I want to fly on the wings of the Red Flight"
|
||||
#define GOSSIP_ITEM_BELGARISTRASZ2 "What abilities do Ruby Drakes have?"
|
||||
#define GOSSIP_ITEM_VERDISA1 "I want to fly on the wings of the Green Flight"
|
||||
#define GOSSIP_ITEM_VERDISA2 "What abilities do Emerald Drakes have?"
|
||||
#define GOSSIP_ITEM_ETERNOS1 "I want to fly on the wings of the Bronze Flight"
|
||||
#define GOSSIP_ITEM_ETERNOS2 "What abilities do Amber Drakes have?"
|
||||
#define GOSSIP_ITEM_DRAKES "So where do we go from here?"
|
||||
#define GOSSIP_ITEM_BELGARISTRASZ1 "I want to fly on the wings of the Red Flight"
|
||||
#define GOSSIP_ITEM_BELGARISTRASZ2 "What abilities do Ruby Drakes have?"
|
||||
#define GOSSIP_ITEM_VERDISA1 "I want to fly on the wings of the Green Flight"
|
||||
#define GOSSIP_ITEM_VERDISA2 "What abilities do Emerald Drakes have?"
|
||||
#define GOSSIP_ITEM_ETERNOS1 "I want to fly on the wings of the Bronze Flight"
|
||||
#define GOSSIP_ITEM_ETERNOS2 "What abilities do Amber Drakes have?"
|
||||
|
||||
#define HAS_ESSENCE(a) ((a)->HasItemCount(ITEM_EMERALD_ESSENCE) || (a)->HasItemCount(ITEM_AMBER_ESSENCE) || (a)->HasItemCount(ITEM_RUBY_ESSENCE))
|
||||
|
||||
|
|
@ -41,125 +41,125 @@ class npc_oculus_drakegiver : public CreatureScript
|
|||
public:
|
||||
npc_oculus_drakegiver() : CreatureScript("npc_oculus_drakegiver") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
if( pCreature->IsQuestGiver() )
|
||||
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
if( pCreature->IsQuestGiver() )
|
||||
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
||||
|
||||
if( pCreature->GetInstanceScript()->GetData(DATA_DRAKOS) == DONE )
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DRAKES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DRAKES, pCreature->GetGUID());
|
||||
}
|
||||
if( pCreature->GetInstanceScript()->GetData(DATA_DRAKOS) == DONE )
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DRAKES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DRAKES, pCreature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->GetGossipMenu().ClearMenu();
|
||||
switch(pCreature->GetEntry())
|
||||
{
|
||||
case NPC_VERDISA:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA1, pCreature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA2, pCreature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_EMERALD_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_EMERALD_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA3, pCreature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NPC_BELGARISTRASZ:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ1, pCreature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ2, pCreature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_RUBY_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_RUBY_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ3, pCreature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NPC_ETERNOS:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS1, pCreature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS2, pCreature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_AMBER_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_AMBER_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS3, pCreature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->GetGossipMenu().ClearMenu();
|
||||
switch(pCreature->GetEntry())
|
||||
{
|
||||
case NPC_VERDISA:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA1, pCreature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA2, pCreature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_EMERALD_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_EMERALD_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA3, pCreature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NPC_BELGARISTRASZ:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ1, pCreature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ2, pCreature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_RUBY_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_RUBY_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ3, pCreature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NPC_ETERNOS:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS1, pCreature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS2, pCreature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_AMBER_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_AMBER_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS3, pCreature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class npc_oculus_drake : public CreatureScript
|
||||
|
|
@ -172,139 +172,139 @@ public:
|
|||
return new npc_oculus_drakeAI (pCreature);
|
||||
}
|
||||
|
||||
struct npc_oculus_drakeAI : public VehicleAI
|
||||
{
|
||||
npc_oculus_drakeAI(Creature *pCreature) : VehicleAI(pCreature)
|
||||
{
|
||||
m_pInstance = me->GetInstanceScript();
|
||||
JustSummoned = true;
|
||||
}
|
||||
struct npc_oculus_drakeAI : public VehicleAI
|
||||
{
|
||||
npc_oculus_drakeAI(Creature *pCreature) : VehicleAI(pCreature)
|
||||
{
|
||||
m_pInstance = me->GetInstanceScript();
|
||||
JustSummoned = true;
|
||||
}
|
||||
|
||||
InstanceScript* m_pInstance;
|
||||
bool JustSummoned;
|
||||
uint16 despawnTimer;
|
||||
InstanceScript* m_pInstance;
|
||||
bool JustSummoned;
|
||||
uint16 despawnTimer;
|
||||
|
||||
void PassengerBoarded(Unit* who, int8 seatid, bool add)
|
||||
{
|
||||
if (add)
|
||||
{
|
||||
me->SetDisableGravity(false);
|
||||
me->SendMovementFlagUpdate();
|
||||
despawnTimer = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
}
|
||||
void PassengerBoarded(Unit* who, int8 seatid, bool add)
|
||||
{
|
||||
if (add)
|
||||
{
|
||||
me->SetDisableGravity(false);
|
||||
me->SendMovementFlagUpdate();
|
||||
despawnTimer = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
{
|
||||
for( uint8 i = 0; i < 8; ++i )
|
||||
if( me->m_spells[i] == spell->Id )
|
||||
{
|
||||
if( target && target->IsAlive() && !target->CanFly() && target->IsHostileTo(me) && !spell->IsTargetingArea())
|
||||
{
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
if( Unit* charmer = me->GetCharmer() )
|
||||
Unit::Kill(charmer, charmer, false);
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
{
|
||||
for( uint8 i = 0; i < 8; ++i )
|
||||
if( me->m_spells[i] == spell->Id )
|
||||
{
|
||||
if( target && target->IsAlive() && !target->CanFly() && target->IsHostileTo(me) && !spell->IsTargetingArea())
|
||||
{
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
if( Unit* charmer = me->GetCharmer() )
|
||||
Unit::Kill(charmer, charmer, false);
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if( JustSummoned )
|
||||
{
|
||||
despawnTimer = 1;
|
||||
JustSummoned = false;
|
||||
if( m_pInstance )
|
||||
{
|
||||
if( !m_pInstance->IsEncounterInProgress() || m_pInstance->GetData(DATA_EREGOS)==IN_PROGRESS )
|
||||
{
|
||||
if( me->GetVehicleKit() && me->IsSummon() )
|
||||
if( !me->GetVehicleKit()->GetPassenger(0) )
|
||||
{
|
||||
TempSummon* ts = (TempSummon*)me;
|
||||
if( Unit* summoner = ts->GetSummoner() )
|
||||
{
|
||||
if( m_pInstance->GetData(DATA_UROM) == DONE )
|
||||
{
|
||||
switch( me->GetEntry() )
|
||||
{
|
||||
case 27692:
|
||||
me->m_spells[5] = 50344;
|
||||
break;
|
||||
case 27755:
|
||||
me->m_spells[5] = 49592;
|
||||
break;
|
||||
case 27756:
|
||||
me->m_spells[5] = 50253;
|
||||
break;
|
||||
}
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if( JustSummoned )
|
||||
{
|
||||
despawnTimer = 1;
|
||||
JustSummoned = false;
|
||||
if( m_pInstance )
|
||||
{
|
||||
if( !m_pInstance->IsEncounterInProgress() || m_pInstance->GetData(DATA_EREGOS)==IN_PROGRESS )
|
||||
{
|
||||
if( me->GetVehicleKit() && me->IsSummon() )
|
||||
if( !me->GetVehicleKit()->GetPassenger(0) )
|
||||
{
|
||||
TempSummon* ts = (TempSummon*)me;
|
||||
if( Unit* summoner = ts->GetSummoner() )
|
||||
{
|
||||
if( m_pInstance->GetData(DATA_UROM) == DONE )
|
||||
{
|
||||
switch( me->GetEntry() )
|
||||
{
|
||||
case 27692:
|
||||
me->m_spells[5] = 50344;
|
||||
break;
|
||||
case 27755:
|
||||
me->m_spells[5] = 49592;
|
||||
break;
|
||||
case 27756:
|
||||
me->m_spells[5] = 50253;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 spell = 0;
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case 27692: spell = 49427; break;
|
||||
case 27755: spell = 49459; break;
|
||||
case 27756: spell = 49463; break;
|
||||
}
|
||||
uint32 spell = 0;
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case 27692: spell = 49427; break;
|
||||
case 27755: spell = 49459; break;
|
||||
case 27756: spell = 49463; break;
|
||||
}
|
||||
|
||||
//summoner->EnterVehicle(me);
|
||||
if (spell)
|
||||
me->CastSpell(summoner, spell, true);
|
||||
me->SetCanFly(true);
|
||||
me->SetSpeed(MOVE_FLIGHT, me->GetSpeedRate(MOVE_RUN), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
//summoner->EnterVehicle(me);
|
||||
if (spell)
|
||||
me->CastSpell(summoner, spell, true);
|
||||
me->SetCanFly(true);
|
||||
me->SetSpeed(MOVE_FLIGHT, me->GetSpeedRate(MOVE_RUN), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (despawnTimer)
|
||||
{
|
||||
if (despawnTimer >= 5000)
|
||||
{
|
||||
despawnTimer = 0;
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
return;
|
||||
}
|
||||
else
|
||||
despawnTimer += diff;
|
||||
}
|
||||
if (despawnTimer)
|
||||
{
|
||||
if (despawnTimer >= 5000)
|
||||
{
|
||||
despawnTimer = 0;
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->DisappearAndDie();
|
||||
me->DespawnOrUnsummon(1);
|
||||
return;
|
||||
}
|
||||
else
|
||||
despawnTimer += diff;
|
||||
}
|
||||
|
||||
VehicleAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
VehicleAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
enum oculusSpells
|
||||
{
|
||||
SPELL_AMBER_SHOCK_CHARGE = 49836,
|
||||
SPELL_RUBY_EVASIVE_CHARGES = 50241,
|
||||
SPELL_AMBER_SHOCK_CHARGE = 49836,
|
||||
SPELL_RUBY_EVASIVE_CHARGES = 50241,
|
||||
};
|
||||
|
||||
// 49838 - Stop Time
|
||||
|
|
@ -405,9 +405,9 @@ class spell_oculus_shock_lance : public SpellScriptLoader
|
|||
{
|
||||
int32 damage = GetHitDamage();
|
||||
if (Unit* target = GetHitUnit())
|
||||
if (Aura* aura = target->GetAura(SPELL_AMBER_SHOCK_CHARGE, GetCaster()->GetGUID())) // shock charges from same caster
|
||||
if (Aura* aura = target->GetAura(SPELL_AMBER_SHOCK_CHARGE, GetCaster()->GetGUID())) // shock charges from same caster
|
||||
{
|
||||
damage += aura->GetStackAmount()*6525;
|
||||
damage += aura->GetStackAmount()*6525;
|
||||
aura->Remove();
|
||||
}
|
||||
|
||||
|
|
@ -446,15 +446,15 @@ class spell_oculus_temporal_rift : public SpellScriptLoader
|
|||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
int32 amount = aurEff->GetAmount() + eventInfo.GetDamageInfo()->GetDamage();
|
||||
int32 amount = aurEff->GetAmount() + eventInfo.GetDamageInfo()->GetDamage();
|
||||
|
||||
uint8 num = amount/15000;
|
||||
if (amount >= 15000)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
for (uint8 i =0; i < num; ++i )
|
||||
caster->CastSpell(GetTarget(), SPELL_AMBER_SHOCK_CHARGE, true);
|
||||
}
|
||||
uint8 num = amount/15000;
|
||||
if (amount >= 15000)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
for (uint8 i =0; i < num; ++i )
|
||||
caster->CastSpell(GetTarget(), SPELL_AMBER_SHOCK_CHARGE, true);
|
||||
}
|
||||
|
||||
const_cast<AuraEffect*>(aurEff)->SetAmount(amount - 15000*num);
|
||||
}
|
||||
|
|
@ -589,15 +589,15 @@ class spell_oculus_ride_ruby_emerald_amber_drake_que : public SpellScriptLoader
|
|||
|
||||
void AddSC_oculus()
|
||||
{
|
||||
new npc_oculus_drakegiver();
|
||||
new npc_oculus_drake();
|
||||
new npc_oculus_drakegiver();
|
||||
new npc_oculus_drake();
|
||||
|
||||
new spell_oculus_stop_time();
|
||||
new spell_oculus_evasive_maneuvers();
|
||||
new spell_oculus_shock_lance();
|
||||
new spell_oculus_temporal_rift();
|
||||
new spell_oculus_touch_the_nightmare();
|
||||
new spell_oculus_dream_funnel();
|
||||
new spell_oculus_call_ruby_emerald_amber_drake();
|
||||
new spell_oculus_ride_ruby_emerald_amber_drake_que();
|
||||
new spell_oculus_stop_time();
|
||||
new spell_oculus_evasive_maneuvers();
|
||||
new spell_oculus_shock_lance();
|
||||
new spell_oculus_temporal_rift();
|
||||
new spell_oculus_touch_the_nightmare();
|
||||
new spell_oculus_dream_funnel();
|
||||
new spell_oculus_call_ruby_emerald_amber_drake();
|
||||
new spell_oculus_ride_ruby_emerald_amber_drake_que();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue