mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
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)
|
||||
return;
|
||||
|
||||
Player* player = (Player*)unitTarget;
|
||||
Player* player = unitTarget->ToPlayer();
|
||||
|
||||
uint32 area_id;
|
||||
WorldLocation loc;
|
||||
@@ -7046,14 +7046,14 @@ void Spell::EffectBind(SpellEffIndex effIndex)
|
||||
SpellTargetPosition const* st = sSpellMgr.GetSpellTargetPosition(m_spellInfo->Id);
|
||||
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;
|
||||
}
|
||||
|
||||
loc.m_mapId = st->target_mapId;
|
||||
loc.m_mapId = st->target_mapId;
|
||||
loc.m_positionX = st->target_X;
|
||||
loc.m_positionY = st->target_Y;
|
||||
loc.m_positionZ = st->target_Y;
|
||||
loc.m_positionZ = st->target_Z;
|
||||
loc.m_orientation = st->target_Orientation;
|
||||
area_id = player->GetAreaId();
|
||||
}
|
||||
@@ -7066,13 +7066,13 @@ void Spell::EffectBind(SpellEffIndex effIndex)
|
||||
player->SetHomebind(loc, area_id);
|
||||
|
||||
// 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_positionY);
|
||||
data << float(loc.m_positionZ);
|
||||
data << uint32(loc.m_mapId);
|
||||
data << uint32(area_id);
|
||||
player->SendDirectMessage( &data );
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
sLog.outStaticDebug("New homebind X : %f", loc.m_positionX);
|
||||
sLog.outStaticDebug("New homebind Y : %f", loc.m_positionY);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
uiYoggSaronGUID = 0;
|
||||
uiAlgalonGUID = 0;
|
||||
uiKologarnChestGUID = 0;
|
||||
uiKologarnChestGUID = 0;
|
||||
uiThorimChestGUID = 0;
|
||||
uiHodirChestGUID = 0;
|
||||
uiFreyaChestGUID = 0;
|
||||
uiLeviathanGateGUID = 0;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user