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:
@@ -7037,7 +7037,7 @@ void Spell::EffectBind(SpellEffIndex effIndex)
|
|||||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Player* player = (Player*)unitTarget;
|
Player* player = unitTarget->ToPlayer();
|
||||||
|
|
||||||
uint32 area_id;
|
uint32 area_id;
|
||||||
WorldLocation loc;
|
WorldLocation loc;
|
||||||
@@ -7046,14 +7046,14 @@ void Spell::EffectBind(SpellEffIndex effIndex)
|
|||||||
SpellTargetPosition const* st = sSpellMgr.GetSpellTargetPosition(m_spellInfo->Id);
|
SpellTargetPosition const* st = sSpellMgr.GetSpellTargetPosition(m_spellInfo->Id);
|
||||||
if (!st)
|
if (!st)
|
||||||
{
|
{
|
||||||
sLog.outError( "Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id );
|
sLog.outError("Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
loc.m_mapId = st->target_mapId;
|
loc.m_mapId = st->target_mapId;
|
||||||
loc.m_positionX = st->target_X;
|
loc.m_positionX = st->target_X;
|
||||||
loc.m_positionY = st->target_Y;
|
loc.m_positionY = st->target_Y;
|
||||||
loc.m_positionZ = st->target_Y;
|
loc.m_positionZ = st->target_Z;
|
||||||
loc.m_orientation = st->target_Orientation;
|
loc.m_orientation = st->target_Orientation;
|
||||||
area_id = player->GetAreaId();
|
area_id = player->GetAreaId();
|
||||||
}
|
}
|
||||||
@@ -7066,13 +7066,13 @@ void Spell::EffectBind(SpellEffIndex effIndex)
|
|||||||
player->SetHomebind(loc, area_id);
|
player->SetHomebind(loc, area_id);
|
||||||
|
|
||||||
// binding
|
// binding
|
||||||
WorldPacket data( SMSG_BINDPOINTUPDATE, (4+4+4+4+4) );
|
WorldPacket data(SMSG_BINDPOINTUPDATE, (4+4+4+4+4));
|
||||||
data << float(loc.m_positionX);
|
data << float(loc.m_positionX);
|
||||||
data << float(loc.m_positionY);
|
data << float(loc.m_positionY);
|
||||||
data << float(loc.m_positionZ);
|
data << float(loc.m_positionZ);
|
||||||
data << uint32(loc.m_mapId);
|
data << uint32(loc.m_mapId);
|
||||||
data << uint32(area_id);
|
data << uint32(area_id);
|
||||||
player->SendDirectMessage( &data );
|
player->SendDirectMessage(&data);
|
||||||
|
|
||||||
sLog.outStaticDebug("New homebind X : %f", loc.m_positionX);
|
sLog.outStaticDebug("New homebind X : %f", loc.m_positionX);
|
||||||
sLog.outStaticDebug("New homebind Y : %f", loc.m_positionY);
|
sLog.outStaticDebug("New homebind Y : %f", loc.m_positionY);
|
||||||
|
|||||||
+9
-9
@@ -530,22 +530,22 @@ class mob_essence_of_twin : public CreatureScript
|
|||||||
public:
|
public:
|
||||||
mob_essence_of_twin() : CreatureScript("mob_essence_of_twin") { }
|
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:
|
case NPC_LIGHT_ESSENCE:
|
||||||
if (pPlayer || pPlayer->HasAura(SPELL_DARK_ESSENCE))
|
player->RemoveAura(SPELL_DARK_ESSENCE);
|
||||||
pPlayer->RemoveAura(SPELL_DARK_ESSENCE);
|
player->CastSpell(player, SPELL_LIGHT_ESSENCE, true);
|
||||||
pPlayer->CastSpell(pPlayer,SPELL_LIGHT_ESSENCE,true);
|
|
||||||
break;
|
break;
|
||||||
case NPC_DARK_ESSENCE:
|
case NPC_DARK_ESSENCE:
|
||||||
if (pPlayer || pPlayer->HasAura(SPELL_LIGHT_ESSENCE))
|
player->RemoveAura(SPELL_LIGHT_ESSENCE);
|
||||||
pPlayer->RemoveAura(SPELL_LIGHT_ESSENCE);
|
player->CastSpell(player, SPELL_DARK_ESSENCE, true);
|
||||||
pPlayer->CastSpell(pPlayer,SPELL_DARK_ESSENCE,true);
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pPlayer->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public:
|
|||||||
uiYoggSaronGUID = 0;
|
uiYoggSaronGUID = 0;
|
||||||
uiAlgalonGUID = 0;
|
uiAlgalonGUID = 0;
|
||||||
uiKologarnChestGUID = 0;
|
uiKologarnChestGUID = 0;
|
||||||
uiKologarnChestGUID = 0;
|
uiThorimChestGUID = 0;
|
||||||
uiHodirChestGUID = 0;
|
uiHodirChestGUID = 0;
|
||||||
uiFreyaChestGUID = 0;
|
uiFreyaChestGUID = 0;
|
||||||
uiLeviathanGateGUID = 0;
|
uiLeviathanGateGUID = 0;
|
||||||
|
|||||||
@@ -127,15 +127,14 @@ class item_nether_wraith_beacon : public ItemScript
|
|||||||
public:
|
public:
|
||||||
item_nether_wraith_beacon() : ItemScript("item_nether_wraith_beacon") { }
|
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;
|
if (Creature *nether = player->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);
|
nether->AI()->AttackStart(player);
|
||||||
Nether = pPlayer->SummonCreature(22408, pPlayer->GetPositionX(), pPlayer->GetPositionY()-20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000);
|
if (Creature *nether = player->SummonCreature(22408, pPlayer->GetPositionX(), pPlayer->GetPositionY()-20, pPlayer->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
|
||||||
if (Nether)
|
nether->AI()->AttackStart(player);
|
||||||
Nether->AI()->AttackStart(pPlayer);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user