Misc fixes
This commit is contained in:
@@ -627,7 +627,7 @@ namespace Game
|
|||||||
{
|
{
|
||||||
Player player = Global.ObjAccessor.FindPlayer(playerCalendarEvent.InviteeGuid);
|
Player player = Global.ObjAccessor.FindPlayer(playerCalendarEvent.InviteeGuid);
|
||||||
if (player)
|
if (player)
|
||||||
if (!calendarEvent.IsGuildEvent() || (calendarEvent.IsGuildEvent() && player.GetGuildId() != calendarEvent.GuildId))
|
if (!calendarEvent.IsGuildEvent() || player.GetGuildId() != calendarEvent.GuildId)
|
||||||
player.SendPacket(packet);
|
player.SendPacket(packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2687,7 +2687,7 @@ namespace Game.Entities
|
|||||||
Log.outError(LogFilter.Player, "Player (guidlow {0}) have invalid coordinates (MapId: {1} {2}). Teleport to default race/class locations.", guid.ToString(), mapId, GetPosition());
|
Log.outError(LogFilter.Player, "Player (guidlow {0}) have invalid coordinates (MapId: {1} {2}). Teleport to default race/class locations.", guid.ToString(), mapId, GetPosition());
|
||||||
RelocateToHomebind();
|
RelocateToHomebind();
|
||||||
}
|
}
|
||||||
else if (mapEntry != null && mapEntry.IsBattlegroundOrArena())
|
else if (mapEntry.IsBattlegroundOrArena())
|
||||||
{
|
{
|
||||||
Battleground currentBg = null;
|
Battleground currentBg = null;
|
||||||
if (m_bgData.bgInstanceID != 0) //saved in Battleground
|
if (m_bgData.bgInstanceID != 0) //saved in Battleground
|
||||||
|
|||||||
@@ -2460,7 +2460,7 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!released && IsBagPos(dst) && pDstItem != null)
|
if (!released && IsBagPos(dst))
|
||||||
{
|
{
|
||||||
Bag bag = pDstItem.ToBag();
|
Bag bag = pDstItem.ToBag();
|
||||||
for (byte i = 0; i < bag.GetBagSize(); ++i)
|
for (byte i = 0; i < bag.GetBagSize(); ++i)
|
||||||
|
|||||||
@@ -898,7 +898,7 @@ namespace Game.Entities
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item != null && duration > 0)
|
if (duration > 0)
|
||||||
{
|
{
|
||||||
GetSession().SendItemEnchantTimeUpdate(GetGUID(), item.GetGUID(), (uint)slot, duration / 1000);
|
GetSession().SendItemEnchantTimeUpdate(GetGUID(), item.GetGUID(), (uint)slot, duration / 1000);
|
||||||
m_enchantDuration.Add(new EnchantDuration(item, slot, duration));
|
m_enchantDuration.Add(new EnchantDuration(item, slot, duration));
|
||||||
@@ -2202,7 +2202,7 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
|
|
||||||
// now re-learn if need re-activate
|
// now re-learn if need re-activate
|
||||||
if (cur_active && !prevSpell.Active && learnLowRank)
|
if (!prevSpell.Active && learnLowRank)
|
||||||
{
|
{
|
||||||
if (AddSpell(prev_id, true, false, prevSpell.Dependent, prevSpell.Disabled))
|
if (AddSpell(prev_id, true, false, prevSpell.Dependent, prevSpell.Disabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4626,7 +4626,7 @@ namespace Game.Entities
|
|||||||
if (pet == null)
|
if (pet == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (IsInWorld && pet != null)
|
if (IsInWorld)
|
||||||
return pet;
|
return pet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -420,7 +420,6 @@ namespace Game
|
|||||||
short event_id = result.Read<byte>(1);
|
short event_id = result.Read<byte>(1);
|
||||||
int internal_event_id = mGameEvent.Length + event_id - 1;
|
int internal_event_id = mGameEvent.Length + event_id - 1;
|
||||||
|
|
||||||
|
|
||||||
GameObjectData data = Global.ObjectMgr.GetGameObjectData(guid);
|
GameObjectData data = Global.ObjectMgr.GetGameObjectData(guid);
|
||||||
if (data == null)
|
if (data == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ namespace Game
|
|||||||
|
|
||||||
pet.ClearUnitState(UnitState.Follow);
|
pet.ClearUnitState(UnitState.Follow);
|
||||||
// This is true if pet has no target or has target but targets differs.
|
// This is true if pet has no target or has target but targets differs.
|
||||||
if (pet.GetVictim() != TargetUnit || (pet.GetVictim() == TargetUnit && !pet.GetCharmInfo().IsCommandAttack()))
|
if (pet.GetVictim() != TargetUnit || !pet.GetCharmInfo().IsCommandAttack())
|
||||||
{
|
{
|
||||||
if (pet.GetVictim())
|
if (pet.GetVictim())
|
||||||
pet.AttackStop();
|
pet.AttackStop();
|
||||||
|
|||||||
@@ -4881,7 +4881,7 @@ namespace Game.Spells
|
|||||||
FactionTemplateRecord casterFaction = caster.GetFactionTemplateEntry();
|
FactionTemplateRecord casterFaction = caster.GetFactionTemplateEntry();
|
||||||
FactionTemplateRecord targetFaction = CliDB.FactionTemplateStorage.LookupByKey(gameObjTarget.GetFaction());
|
FactionTemplateRecord targetFaction = CliDB.FactionTemplateStorage.LookupByKey(gameObjTarget.GetFaction());
|
||||||
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons)
|
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons)
|
||||||
if (targetFaction == null || (casterFaction != null && targetFaction != null && !casterFaction.IsFriendlyTo(targetFaction)))
|
if (targetFaction == null || (casterFaction != null && !casterFaction.IsFriendlyTo(targetFaction)))
|
||||||
gameObjTarget.ModifyHealth(-damage, caster, GetSpellInfo().Id);
|
gameObjTarget.ModifyHealth(-damage, caster, GetSpellInfo().Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user