Merge pull request #83 from H0zen/develop21
Various external fixes - part 1
This commit is contained in:
commit
50e913d252
@ -993,15 +993,18 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
|
||||
recv_data >> guid;
|
||||
DEBUG_LOG("Inspected guid is %s", guid.GetString().c_str());
|
||||
|
||||
_player->SetSelectionGuid(guid);
|
||||
|
||||
Player* plr = sObjectMgr.GetPlayer(guid);
|
||||
if (!plr) // wrong player
|
||||
{ return; }
|
||||
if (plr && _player->IsFriendlyTo(plr) && _player->IsWithinDistInMap(plr, TRADE_DISTANCE, false)) // why not 3D check?
|
||||
{
|
||||
_player->SetSelectionGuid(guid);
|
||||
|
||||
WorldPacket data(SMSG_INSPECT, 8);
|
||||
data << ObjectGuid(guid);
|
||||
SendPacket(&data);
|
||||
}
|
||||
else
|
||||
{ DEBUG_LOG("%s not found!", guid.GetString().c_str()); }
|
||||
|
||||
WorldPacket data(SMSG_INSPECT, 8);
|
||||
data << ObjectGuid(guid);
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
||||
@ -1010,7 +1013,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
||||
recv_data >> guid;
|
||||
|
||||
Player* pl = sObjectMgr.GetPlayer(guid);
|
||||
if (pl)
|
||||
if (pl && _player->IsFriendlyTo(pl) && _player->IsWithinDistInMap(pl, TRADE_DISTANCE, false))
|
||||
{
|
||||
WorldPacket data(MSG_INSPECT_HONOR_STATS, (8 + 1 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 1));
|
||||
data << guid; // player guid
|
||||
|
@ -3022,7 +3022,7 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
|
||||
|
||||
NewSummon->SetRespawnCoord(pos);
|
||||
|
||||
uint32 petlevel = m_caster->getLevel();
|
||||
uint32 petlevel = std::max(m_caster->getLevel() + m_spellInfo->EffectMultipleValue[eff_idx], 1.0f);
|
||||
NewSummon->setPetType(SUMMON_PET);
|
||||
|
||||
uint32 faction = m_caster->getFaction();
|
||||
@ -5192,7 +5192,7 @@ void Spell::EffectBind(SpellEffectIndex eff_idx)
|
||||
|
||||
// zone update
|
||||
data.Initialize(SMSG_PLAYERBOUND, 8 + 4);
|
||||
data << player->GetObjectGuid();
|
||||
data << m_caster->GetObjectGuid();
|
||||
data << uint32(area_id);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user