Core/Spells: Fixed bad Z coordinate for Spell::EffectBind with location stored in database

Core/Scripts: Corrected few mistakes in misc scripts

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-03 13:54:00 +01:00
parent bd4b47af0e
commit 3badf69b63
4 changed files with 22 additions and 23 deletions

View File

@@ -530,22 +530,22 @@ class mob_essence_of_twin : public CreatureScript
public:
mob_essence_of_twin() : CreatureScript("mob_essence_of_twin") { }
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* player, Creature* creature)
{
switch(pCreature->GetEntry())
switch (creature->GetEntry())
{
case NPC_LIGHT_ESSENCE:
if (pPlayer || pPlayer->HasAura(SPELL_DARK_ESSENCE))
pPlayer->RemoveAura(SPELL_DARK_ESSENCE);
pPlayer->CastSpell(pPlayer,SPELL_LIGHT_ESSENCE,true);
player->RemoveAura(SPELL_DARK_ESSENCE);
player->CastSpell(player, SPELL_LIGHT_ESSENCE, true);
break;
case NPC_DARK_ESSENCE:
if (pPlayer || pPlayer->HasAura(SPELL_LIGHT_ESSENCE))
pPlayer->RemoveAura(SPELL_LIGHT_ESSENCE);
pPlayer->CastSpell(pPlayer,SPELL_DARK_ESSENCE,true);
player->RemoveAura(SPELL_LIGHT_ESSENCE);
player->CastSpell(player, SPELL_DARK_ESSENCE, true);
break;
default:
break;
}
pPlayer->CLOSE_GOSSIP_MENU();
player->CLOSE_GOSSIP_MENU();
return true;
}
};

View File

@@ -90,7 +90,7 @@ public:
uiYoggSaronGUID = 0;
uiAlgalonGUID = 0;
uiKologarnChestGUID = 0;
uiKologarnChestGUID = 0;
uiThorimChestGUID = 0;
uiHodirChestGUID = 0;
uiFreyaChestGUID = 0;
uiLeviathanGateGUID = 0;

View File

@@ -127,15 +127,14 @@ class item_nether_wraith_beacon : public ItemScript
public:
item_nether_wraith_beacon() : ItemScript("item_nether_wraith_beacon") { }
bool OnUse(Player* pPlayer, Item* /*pItem*/, SpellCastTargets const& /*targets*/)
bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/)
{
if (pPlayer->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE)
if (player->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE)
{
Creature *Nether;
Nether = pPlayer->SummonCreature(22408, pPlayer->GetPositionX(), pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000);
Nether = pPlayer->SummonCreature(22408, pPlayer->GetPositionX(), pPlayer->GetPositionY()-20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000);
if (Nether)
Nether->AI()->AttackStart(pPlayer);
if (Creature *nether = player->SummonCreature(22408, pPlayer->GetPositionX(), pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
nether->AI()->AttackStart(player);
if (Creature *nether = player->SummonCreature(22408, pPlayer->GetPositionX(), pPlayer->GetPositionY()-20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
nether->AI()->AttackStart(player);
}
return false;
}