Misc fixes, and added GetDebugInfo() which was missed.
This commit is contained in:
@@ -940,7 +940,7 @@ namespace Framework.Constants
|
|||||||
CommandNoInstancesMatch = 1189,
|
CommandNoInstancesMatch = 1189,
|
||||||
CommandMultipleInstancesMatch = 1190,
|
CommandMultipleInstancesMatch = 1190,
|
||||||
CommandMultipleInstancesEntry = 1191,
|
CommandMultipleInstancesEntry = 1191,
|
||||||
CommandMapNotInstance = 1192,
|
// 1192 unused,
|
||||||
CommandInstanceNoEntrance = 1193,
|
CommandInstanceNoEntrance = 1193,
|
||||||
CommandInstanceNoExit = 1194,
|
CommandInstanceNoExit = 1194,
|
||||||
CommandWentToInstanceGate = 1195,
|
CommandWentToInstanceGate = 1195,
|
||||||
@@ -956,13 +956,13 @@ namespace Framework.Constants
|
|||||||
DebugAreatriggerOff = 1203,
|
DebugAreatriggerOff = 1203,
|
||||||
DebugAreatriggerEntered = 1204,
|
DebugAreatriggerEntered = 1204,
|
||||||
|
|
||||||
CommandNoBossesMatch = 1205, // 3.3.5 Reserved
|
CommandNoBossesMatch = 1205,
|
||||||
CommandMultipleBossesMatch = 1206, // 3.3.5 Reserved
|
CommandMultipleBossesMatch = 1206,
|
||||||
CommandMultipleBossesEntry = 1207, // 3.3.5 Reserved
|
CommandMultipleBossesEntry = 1207,
|
||||||
CommandBossMultipleSpawns = 1208, // 3.3.5 Reserved
|
CommandBossMultipleSpawns = 1208,
|
||||||
CommandBossMultipleSpawnEty = 1209, // 3.3.5 Reserved
|
CommandBossMultipleSpawnEty = 1209,
|
||||||
CommandGoBossFailed = 1210, // 3.3.5 Reserved
|
CommandGoBossFailed = 1210,
|
||||||
CommandWentToBoss = 1211, // 3.3.5 Reserved
|
CommandWentToBoss = 1211,
|
||||||
GuildInfoLevel = 1212,
|
GuildInfoLevel = 1212,
|
||||||
AccountBnetLinked = 1213,
|
AccountBnetLinked = 1213,
|
||||||
AccountOrBnetDoesNotExist = 1214,
|
AccountOrBnetDoesNotExist = 1214,
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ public static class Time
|
|||||||
long midnightLocal = DateTimeToUnixTime(timeLocal);
|
long midnightLocal = DateTimeToUnixTime(timeLocal);
|
||||||
long hourLocal = midnightLocal + hour * Hour;
|
long hourLocal = midnightLocal + hour * Hour;
|
||||||
|
|
||||||
if (onlyAfterTime && hourLocal < time)
|
if (onlyAfterTime && hourLocal <= time)
|
||||||
hourLocal += Day;
|
hourLocal += Day;
|
||||||
|
|
||||||
return hourLocal;
|
return hourLocal;
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ namespace Game.AI
|
|||||||
{
|
{
|
||||||
if (_isEngaged)
|
if (_isEngaged)
|
||||||
{
|
{
|
||||||
//Log.outError(LogFilter.ScriptsAi, $"CreatureAI::EngagementStart called even though creature is already engaged. Creature debug info:\n{me.GetDebugInfo()}");
|
Log.outError(LogFilter.ScriptsAi, $"CreatureAI::EngagementStart called even though creature is already engaged. Creature debug info:\n{me.GetDebugInfo()}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_isEngaged = true;
|
_isEngaged = true;
|
||||||
@@ -286,7 +286,7 @@ namespace Game.AI
|
|||||||
{
|
{
|
||||||
if (!_isEngaged)
|
if (!_isEngaged)
|
||||||
{
|
{
|
||||||
//Log.outError(LogFilter.ScriptsAi, $"CreatureAI::EngagementOver called even though creature is not currently engaged. Creature debug info:\n{me.GetDebugInfo()}");
|
Log.outError(LogFilter.ScriptsAi, $"CreatureAI::EngagementOver called even though creature is not currently engaged. Creature debug info:\n{me.GetDebugInfo()}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_isEngaged = false;
|
_isEngaged = false;
|
||||||
|
|||||||
@@ -478,7 +478,7 @@ namespace Game.AI
|
|||||||
|
|
||||||
if (me.GetCharmInfo() == null)
|
if (me.GetCharmInfo() == null)
|
||||||
{
|
{
|
||||||
//Log.outError(LogFilter.ScriptsAi, $"me.GetCharmInfo() is NULL in PetAI::CanAttack(). Debug info: {}", GetDebugInfo());
|
Log.outError(LogFilter.ScriptsAi, $"me.GetCharmInfo() is NULL in PetAI::CanAttack(). Debug info: {GetDebugInfo()}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -502,6 +502,11 @@ namespace Game.AI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void OnGameEvent(bool start, ushort eventId) { }
|
public virtual void OnGameEvent(bool start, ushort eventId) { }
|
||||||
|
|
||||||
|
public virtual string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"Me: {(me != null ? me.GetDebugInfo() : "NULL")}";
|
||||||
|
}
|
||||||
|
|
||||||
public static AISpellInfoType GetAISpellInfo(uint spellId, Difficulty difficulty)
|
public static AISpellInfoType GetAISpellInfo(uint spellId, Difficulty difficulty)
|
||||||
{
|
{
|
||||||
return _aiSpellInfo.LookupByKey((spellId, difficulty));
|
return _aiSpellInfo.LookupByKey((spellId, difficulty));
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ namespace Game.Chat
|
|||||||
|
|
||||||
Player bad = Global.ObjAccessor.FindPlayerByName(badname);
|
Player bad = Global.ObjAccessor.FindPlayerByName(badname);
|
||||||
ObjectGuid victim = bad ? bad.GetGUID() : ObjectGuid.Empty;
|
ObjectGuid victim = bad ? bad.GetGUID() : ObjectGuid.Empty;
|
||||||
if (victim.IsEmpty() || !IsOn(victim))
|
if (bad == null || victim.IsEmpty() || !IsOn(victim))
|
||||||
{
|
{
|
||||||
ChannelNameBuilder builder = new(this, new PlayerNotFoundAppend(badname));
|
ChannelNameBuilder builder = new(this, new PlayerNotFoundAppend(badname));
|
||||||
SendToOne(builder, good);
|
SendToOne(builder, good);
|
||||||
@@ -434,7 +434,7 @@ namespace Game.Chat
|
|||||||
Player newp = Global.ObjAccessor.FindPlayerByName(p2n);
|
Player newp = Global.ObjAccessor.FindPlayerByName(p2n);
|
||||||
ObjectGuid victim = newp ? newp.GetGUID() : ObjectGuid.Empty;
|
ObjectGuid victim = newp ? newp.GetGUID() : ObjectGuid.Empty;
|
||||||
|
|
||||||
if (victim.IsEmpty() || !IsOn(victim) ||
|
if (newp == null || victim.IsEmpty() || !IsOn(victim) ||
|
||||||
(player.GetTeam() != newp.GetTeam() &&
|
(player.GetTeam() != newp.GetTeam() &&
|
||||||
(!player.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel) ||
|
(!player.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel) ||
|
||||||
!newp.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel))))
|
!newp.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel))))
|
||||||
@@ -490,7 +490,7 @@ namespace Game.Chat
|
|||||||
Player newp = Global.ObjAccessor.FindPlayerByName(newname);
|
Player newp = Global.ObjAccessor.FindPlayerByName(newname);
|
||||||
ObjectGuid victim = newp ? newp.GetGUID() : ObjectGuid.Empty;
|
ObjectGuid victim = newp ? newp.GetGUID() : ObjectGuid.Empty;
|
||||||
|
|
||||||
if (victim.IsEmpty() || !IsOn(victim) ||
|
if (newp == null || victim.IsEmpty() || !IsOn(victim) ||
|
||||||
(player.GetTeam() != newp.GetTeam() &&
|
(player.GetTeam() != newp.GetTeam() &&
|
||||||
(!player.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel) ||
|
(!player.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel) ||
|
||||||
!newp.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel))))
|
!newp.GetSession().HasPermission(RBACPermissions.TwoSideInteractionChannel))))
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ namespace Game.Chat.Commands
|
|||||||
InstanceTemplate temp = Global.ObjectMgr.GetInstanceTemplate(mapId);
|
InstanceTemplate temp = Global.ObjectMgr.GetInstanceTemplate(mapId);
|
||||||
if (temp == null)
|
if (temp == null)
|
||||||
{
|
{
|
||||||
handler.SendSysMessage(CypherStrings.CommandMapNotInstance, mapId);
|
//handler.SendSysMessage(CypherStrings.CommandMapNotInstance, mapId);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
string scriptname = Global.ObjectMgr.GetScriptName(temp.ScriptId);
|
string scriptname = Global.ObjectMgr.GetScriptName(temp.ScriptId);
|
||||||
|
|||||||
@@ -1098,6 +1098,11 @@ namespace Game.Entities
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\nAIName: {GetAIName()} ScriptName: {GetScriptName()} WaypointPath: {GetWaypointPath()} SpawnId: {GetSpawnId()}";
|
||||||
|
}
|
||||||
|
|
||||||
public override bool IsMovementPreventedByCasting()
|
public override bool IsMovementPreventedByCasting()
|
||||||
{
|
{
|
||||||
// first check if currently a movement allowed channel is active and we're not casting
|
// first check if currently a movement allowed channel is active and we're not casting
|
||||||
@@ -3022,7 +3027,7 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
if (!HasSpellFocus())
|
if (!HasSpellFocus())
|
||||||
{
|
{
|
||||||
//Log.outError(LogFilter.Unit, $"Creature::ReacquireSpellFocusTarget() being called with HasSpellFocus() returning false. {GetDebugInfo()}");
|
Log.outError(LogFilter.Unit, $"Creature::ReacquireSpellFocusTarget() being called with HasSpellFocus() returning false. {GetDebugInfo()}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3170,7 +3175,7 @@ namespace Game.Entities
|
|||||||
// @todo pools need fixing! this is just a temporary thing, but they violate dynspawn principles
|
// @todo pools need fixing! this is just a temporary thing, but they violate dynspawn principles
|
||||||
if (Global.PoolMgr.IsPartOfAPool<Creature>(spawnId) == 0)
|
if (Global.PoolMgr.IsPartOfAPool<Creature>(spawnId) == 0)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Unit, $"Creature (SpawnID {spawnId}) trying to load in inactive spawn group '{data.spawnGroupData.name}'");
|
Log.outError(LogFilter.Unit, $"Creature (SpawnID {spawnId}) trying to load in inactive spawn group '{data.spawnGroupData.name}':\n{GetDebugInfo()}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3185,7 +3190,7 @@ namespace Game.Entities
|
|||||||
// @todo same as above
|
// @todo same as above
|
||||||
if (Global.PoolMgr.IsPartOfAPool<Creature>(spawnId) == 0)
|
if (Global.PoolMgr.IsPartOfAPool<Creature>(spawnId) == 0)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Unit, $"Creature (SpawnID {spawnId}) trying to load despite a respawn timer in progress");
|
Log.outError(LogFilter.Unit, $"Creature (SpawnID {spawnId}) trying to load despite a respawn timer in progress:\n{GetDebugInfo()}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2292,6 +2292,11 @@ namespace Game.Entities
|
|||||||
return localRotation;
|
return localRotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\nSpawnId: {GetSpawnId()} GoState: {GetGoState()} ScriptId: {GetScriptId()} AIName: {GetAIName()}";
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsAtInteractDistance(Player player, SpellInfo spell = null)
|
public bool IsAtInteractDistance(Player player, SpellInfo spell = null)
|
||||||
{
|
{
|
||||||
if (spell != null || (spell = GetSpellForLock(player)) != null)
|
if (spell != null || (spell = GetSpellForLock(player)) != null)
|
||||||
|
|||||||
@@ -2340,6 +2340,11 @@ namespace Game.Entities
|
|||||||
return _bonusData.RequiredLevel;
|
return _bonusData.RequiredLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\nOwner: {GetOwnerGUID()} Count: {GetCount()} BagSlot: {GetBagSlot()} Slot: {GetSlot()} Equipped: {IsEquipped()}";
|
||||||
|
}
|
||||||
|
|
||||||
public static Item NewItemOrBag(ItemTemplate proto)
|
public static Item NewItemOrBag(ItemTemplate proto)
|
||||||
{
|
{
|
||||||
if (proto.GetInventoryType() == InventoryType.Bag)
|
if (proto.GetInventoryType() == InventoryType.Bag)
|
||||||
|
|||||||
@@ -15,8 +15,10 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using Game.DataStorage;
|
||||||
using Game.Maps;
|
using Game.Maps;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace Game.Entities
|
namespace Game.Entities
|
||||||
@@ -409,6 +411,12 @@ namespace Game.Entities
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual string GetDebugInfo()
|
||||||
|
{
|
||||||
|
var mapEntry = CliDB.MapStorage.LookupByKey(_mapId);
|
||||||
|
return $"MapID: {_mapId} Map name: '{(mapEntry != null ? mapEntry.MapName[Global.WorldMgr.GetDefaultDbcLocale()] : "<not found>")}' {base.ToString()}";
|
||||||
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"X: {posX} Y: {posY} Z: {posZ} O: {Orientation} MapId: {_mapId}";
|
return $"X: {posX} Y: {posY} Z: {posZ} O: {Orientation} MapId: {_mapId}";
|
||||||
|
|||||||
@@ -750,6 +750,11 @@ namespace Game.Entities
|
|||||||
BuildValuesUpdateBlockForPlayer(data_map[player], player);
|
BuildValuesUpdateBlockForPlayer(data_map[player], player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\n{GetGUID()} Entry: {GetEntry()}\nName: { GetName()}";
|
||||||
|
}
|
||||||
|
|
||||||
public abstract void BuildValuesCreate(WorldPacket data, Player target);
|
public abstract void BuildValuesCreate(WorldPacket data, Player target);
|
||||||
public abstract void BuildValuesUpdate(WorldPacket data, Player target);
|
public abstract void BuildValuesUpdate(WorldPacket data, Player target);
|
||||||
|
|
||||||
|
|||||||
@@ -1598,6 +1598,11 @@ namespace Game.Entities
|
|||||||
return ss.ToString();
|
return ss.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\nPetType: {GetPetType()}";
|
||||||
|
}
|
||||||
|
|
||||||
public DeclinedName GetDeclinedNames() { return _declinedname; }
|
public DeclinedName GetDeclinedNames() { return _declinedname; }
|
||||||
|
|
||||||
public new Dictionary<uint, PetSpell> m_spells = new();
|
public new Dictionary<uint, PetSpell> m_spells = new();
|
||||||
|
|||||||
@@ -300,6 +300,11 @@ namespace Game.Entities
|
|||||||
base.RemoveFromWorld();
|
base.RemoveFromWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\nTempSummonType : {GetSummonType()} Summoner: {GetSummonerGUID()}";
|
||||||
|
}
|
||||||
|
|
||||||
public override void SaveToDB(uint mapid, List<Difficulty> spawnDifficulties) { }
|
public override void SaveToDB(uint mapid, List<Difficulty> spawnDifficulties) { }
|
||||||
|
|
||||||
public ObjectGuid GetSummonerGUID() { return m_summonerGUID; }
|
public ObjectGuid GetSummonerGUID() { return m_summonerGUID; }
|
||||||
@@ -380,6 +385,11 @@ namespace Game.Entities
|
|||||||
return IsPet() || (m_Properties != null && m_Properties.Control == SummonCategory.Pet);
|
return IsPet() || (m_Properties != null && m_Properties.Control == SummonCategory.Pet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\nOwner: {(GetOwner() ? GetOwner().GetGUID() : "")}";
|
||||||
|
}
|
||||||
|
|
||||||
public override Unit GetOwner() { return m_owner; }
|
public override Unit GetOwner() { return m_owner; }
|
||||||
|
|
||||||
public override float GetFollowAngle() { return m_followAngle; }
|
public override float GetFollowAngle() { return m_followAngle; }
|
||||||
|
|||||||
@@ -817,7 +817,7 @@ namespace Game.Entities
|
|||||||
if (pet.IsAIEnabled())
|
if (pet.IsAIEnabled())
|
||||||
pet.GetAI().KilledUnit(victim);
|
pet.GetAI().KilledUnit(victim);
|
||||||
else
|
else
|
||||||
Log.outError(LogFilter.Unit, "Pet doesn't have any AI in Unit.Kill()");
|
Log.outError(LogFilter.Unit, $"Pet doesn't have any AI in Unit.Kill() {pet.GetDebugInfo()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -847,6 +847,12 @@ namespace Game.Entities
|
|||||||
return collisionHeight1 == 0.0f ? MapConst.DefaultCollesionHeight : collisionHeight1;
|
return collisionHeight1 == 0.0f ? MapConst.DefaultCollesionHeight : collisionHeight1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\nIsAIEnabled: {IsAIEnabled()} DeathState: {GetDeathState()} UnitMovementFlags: {GetUnitMovementFlags()} UnitMovementFlags2: {GetUnitMovementFlags2()} Class: {GetClass()}\n" +
|
||||||
|
$" {(MoveSpline != null ? MoveSpline.ToString() : "Movespline: <none>")}";
|
||||||
|
}
|
||||||
|
|
||||||
public Guardian GetGuardianPet()
|
public Guardian GetGuardianPet()
|
||||||
{
|
{
|
||||||
ObjectGuid pet_guid = GetPetGUID();
|
ObjectGuid pet_guid = GetPetGUID();
|
||||||
@@ -1424,7 +1430,7 @@ namespace Game.Entities
|
|||||||
// this can happen if OnEffectHitTarget() script hook killed the unit or the aura owner (which can be different)
|
// this can happen if OnEffectHitTarget() script hook killed the unit or the aura owner (which can be different)
|
||||||
if (aura.IsRemoved())
|
if (aura.IsRemoved())
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Spells, "Unit::_CreateAuraApplication() called with a removed aura. Check if OnEffectHitTarget() is triggering any spell with apply aura effect (that's not allowed!)");//\nUnit: {}\nAura: {}", GetDebugInfo().c_str(), aura->GetDebugInfo().c_str());
|
Log.outError(LogFilter.Spells, $"Unit::_CreateAuraApplication() called with a removed aura. Check if OnEffectHitTarget() is triggering any spell with apply aura effect (that's not allowed!)\nUnit: {GetDebugInfo()}\nAura: {aura.GetDebugInfo()}");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace Game
|
|||||||
[WorldPacketHandler(ClientOpcodes.UpdateAccountData, Status = SessionStatus.Authed)]
|
[WorldPacketHandler(ClientOpcodes.UpdateAccountData, Status = SessionStatus.Authed)]
|
||||||
void HandleUpdateAccountData(UserClientUpdateAccountData packet)
|
void HandleUpdateAccountData(UserClientUpdateAccountData packet)
|
||||||
{
|
{
|
||||||
if (packet.DataType > AccountDataTypes.Max)
|
if (packet.DataType >= AccountDataTypes.Max)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (packet.Size == 0)
|
if (packet.Size == 0)
|
||||||
|
|||||||
+11
-1
@@ -202,7 +202,7 @@ namespace Game.Maps
|
|||||||
if (Global.MMapMgr.LoadMap(Global.WorldMgr.GetDataPath(), GetId(), gx, gy))
|
if (Global.MMapMgr.LoadMap(Global.WorldMgr.GetDataPath(), GetId(), gx, gy))
|
||||||
Log.outInfo(LogFilter.Maps, "MMAP loaded name:{0}, id:{1}, x:{2}, y:{3} (mmap rep.: x:{4}, y:{5})", GetMapName(), GetId(), gx, gy, gx, gy);
|
Log.outInfo(LogFilter.Maps, "MMAP loaded name:{0}, id:{1}, x:{2}, y:{3} (mmap rep.: x:{4}, y:{5})", GetMapName(), GetId(), gx, gy, gx, gy);
|
||||||
else
|
else
|
||||||
Log.outInfo(LogFilter.Maps, "Could not load MMAP name:{0}, id:{1}, x:{2}, y:{3} (mmap rep.: x:{4}, y:{5})", GetMapName(), GetId(), gx, gy, gx, gy);
|
Log.outWarn(LogFilter.Maps, "Could not load MMAP name:{0}, id:{1}, x:{2}, y:{3} (mmap rep.: x:{4}, y:{5})", GetMapName(), GetId(), gx, gy, gx, gy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadVMap(uint gx, uint gy)
|
void LoadVMap(uint gx, uint gy)
|
||||||
@@ -3488,6 +3488,11 @@ namespace Game.Maps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"Id: {GetId()} InstanceId: {GetInstanceId()} Difficulty: {GetDifficultyID()} HasPlayers: {HavePlayers()}";
|
||||||
|
}
|
||||||
|
|
||||||
public MapRecord GetEntry()
|
public MapRecord GetEntry()
|
||||||
{
|
{
|
||||||
return i_mapRecord;
|
return i_mapRecord;
|
||||||
@@ -5432,6 +5437,11 @@ namespace Game.Maps
|
|||||||
return i_script_id;
|
return i_script_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"{base.GetDebugInfo()}\nScriptId: {GetScriptId()} ScriptName: {GetScriptName()}";
|
||||||
|
}
|
||||||
|
|
||||||
public InstanceScript GetInstanceScript()
|
public InstanceScript GetInstanceScript()
|
||||||
{
|
{
|
||||||
return i_data;
|
return i_data;
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ namespace Game.Movement
|
|||||||
bool departureEvent = true;
|
bool departureEvent = true;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
Cypher.Assert(_currentNode < _path.Count, $"Point Id: {pointId}\n{owner.GetDebugInfo()}");
|
||||||
|
|
||||||
DoEventIfAny(owner, _path[_currentNode], departureEvent);
|
DoEventIfAny(owner, _path[_currentNode], departureEvent);
|
||||||
while (!_pointsForPathSwitch.Empty() && _pointsForPathSwitch[0].PathIndex <= _currentNode)
|
while (!_pointsForPathSwitch.Empty() && _pointsForPathSwitch[0].PathIndex <= _currentNode)
|
||||||
{
|
{
|
||||||
@@ -226,6 +228,8 @@ namespace Game.Movement
|
|||||||
|
|
||||||
void DoEventIfAny(Player owner, TaxiPathNodeRecord node, bool departure)
|
void DoEventIfAny(Player owner, TaxiPathNodeRecord node, bool departure)
|
||||||
{
|
{
|
||||||
|
Cypher.Assert(node != null, owner.GetDebugInfo());
|
||||||
|
|
||||||
uint eventid = departure ? node.DepartureEventID : node.ArrivalEventID;
|
uint eventid = departure ? node.DepartureEventID : node.ArrivalEventID;
|
||||||
if (eventid != 0)
|
if (eventid != 0)
|
||||||
{
|
{
|
||||||
@@ -263,6 +267,20 @@ namespace Game.Movement
|
|||||||
Log.outDebug(LogFilter.Server, "FlightPathMovementGenerator::PreloadEndGrid: Unable to determine map to preload flightmaster grid");
|
Log.outDebug(LogFilter.Server, "FlightPathMovementGenerator::PreloadEndGrid: Unable to determine map to preload flightmaster grid");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint GetPathId(int index)
|
||||||
|
{
|
||||||
|
if (index >= _path.Count)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return _path[index].PathID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"Current Node: {GetCurrentNode()}\n{base.GetDebugInfo()}\nStart Path Id: {GetPathId(0)} Path Size: {_path.Count} HasArrived: {HasArrived()} End Grid X: {_endGridX} " +
|
||||||
|
$"End Grid Y: {_endGridY} End Map Id: {_endMapId} Preloaded Target Node: {_preloadTargetNode}";
|
||||||
|
}
|
||||||
|
|
||||||
public override bool GetResetPosition(Unit u, out float x, out float y, out float z)
|
public override bool GetResetPosition(Unit u, out float x, out float y, out float z)
|
||||||
{
|
{
|
||||||
var node = _path[_currentNode];
|
var node = _path[_currentNode];
|
||||||
|
|||||||
@@ -76,6 +76,11 @@ namespace Game.Movement
|
|||||||
{
|
{
|
||||||
return obj.Mode.GetHashCode() ^ obj.Priority.GetHashCode();
|
return obj.Mode.GetHashCode() ^ obj.Priority.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"Mode: {Mode} Priority: {Priority} Flags: {Flags} BaseUniteState: {BaseUnitState}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class MovementGeneratorMedium<T> : MovementGenerator where T : Unit
|
public abstract class MovementGeneratorMedium<T> : MovementGenerator where T : Unit
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ namespace Game.Movement
|
|||||||
// this is probably an error state, but we'll leave it
|
// this is probably an error state, but we'll leave it
|
||||||
// and hopefully recover on the next Update
|
// and hopefully recover on the next Update
|
||||||
// we still need to copy our preffix
|
// we still need to copy our preffix
|
||||||
Log.outError(LogFilter.Maps, "{0}'s Path Build failed: 0 length path", _sourceUnit.GetGUID().ToString());
|
Log.outError(LogFilter.Maps, $"Path Build failed\n{_sourceUnit.GetDebugInfo()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.outDebug(LogFilter.Maps, "m_polyLength={0} prefixPolyLength={1} suffixPolyLength={2} \n", _polyLength, prefixPolyLength, suffixPolyLength);
|
Log.outDebug(LogFilter.Maps, "m_polyLength={0} prefixPolyLength={1} suffixPolyLength={2} \n", _polyLength, prefixPolyLength, suffixPolyLength);
|
||||||
@@ -709,7 +709,7 @@ namespace Game.Movement
|
|||||||
npolys = FixupCorridor(polys, npolys, 74, visited, nvisited);
|
npolys = FixupCorridor(polys, npolys, 74, visited, nvisited);
|
||||||
|
|
||||||
if (Detour.dtStatusFailed(_navMeshQuery.getPolyHeight(polys[0], result, ref result[1])))
|
if (Detour.dtStatusFailed(_navMeshQuery.getPolyHeight(polys[0], result, ref result[1])))
|
||||||
Log.outDebug(LogFilter.Maps, $"Cannot find height at position X: {result[2]} Y: {result[0]} Z: {result[1]} for ");// {_sourceUnit.GetDebugInfo()}");
|
Log.outDebug(LogFilter.Maps, $"Cannot find height at position X: {result[2]} Y: {result[0]} Z: {result[1]} for {_sourceUnit.GetDebugInfo()}");
|
||||||
|
|
||||||
result[1] += 0.5f;
|
result[1] += 0.5f;
|
||||||
Detour.dtVcopy(iterPos, result);
|
Detour.dtVcopy(iterPos, result);
|
||||||
|
|||||||
@@ -397,6 +397,11 @@ namespace Game.Movement
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"Current Node: {_currentNode}\n{base.GetDebugInfo()}";
|
||||||
|
}
|
||||||
|
|
||||||
bool UpdateTimer(uint diff)
|
bool UpdateTimer(uint diff)
|
||||||
{
|
{
|
||||||
_nextMoveTime.Update((int)diff);
|
_nextMoveTime.Update((int)diff);
|
||||||
|
|||||||
@@ -542,14 +542,14 @@ namespace Game
|
|||||||
Values[WorldCfg.InstanceResetTimeHour] = GetDefaultValue("Instance.ResetTimeHour", 4);
|
Values[WorldCfg.InstanceResetTimeHour] = GetDefaultValue("Instance.ResetTimeHour", 4);
|
||||||
Values[WorldCfg.InstanceUnloadDelay] = GetDefaultValue("Instance.UnloadDelay", 30 * Time.Minute * Time.InMilliseconds);
|
Values[WorldCfg.InstanceUnloadDelay] = GetDefaultValue("Instance.UnloadDelay", 30 * Time.Minute * Time.InMilliseconds);
|
||||||
Values[WorldCfg.DailyQuestResetTimeHour] = GetDefaultValue("Quests.DailyResetTime", 3);
|
Values[WorldCfg.DailyQuestResetTimeHour] = GetDefaultValue("Quests.DailyResetTime", 3);
|
||||||
if ((int)Values[WorldCfg.DailyQuestResetTimeHour] < 0 || (int)Values[WorldCfg.DailyQuestResetTimeHour] > 23)
|
if ((int)Values[WorldCfg.DailyQuestResetTimeHour] > 23)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.ServerLoading, $"Quests.DailyResetTime ({Values[WorldCfg.DailyQuestResetTimeHour]}) must be in range 0..23. Set to 3.");
|
Log.outError(LogFilter.ServerLoading, $"Quests.DailyResetTime ({Values[WorldCfg.DailyQuestResetTimeHour]}) must be in range 0..23. Set to 3.");
|
||||||
Values[WorldCfg.DailyQuestResetTimeHour] = 3;
|
Values[WorldCfg.DailyQuestResetTimeHour] = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
Values[WorldCfg.WeeklyQuestResetTimeWDay] = GetDefaultValue("Quests.WeeklyResetWDay", 3);
|
Values[WorldCfg.WeeklyQuestResetTimeWDay] = GetDefaultValue("Quests.WeeklyResetWDay", 3);
|
||||||
if ((int)Values[WorldCfg.WeeklyQuestResetTimeWDay] < 0 || (int)Values[WorldCfg.WeeklyQuestResetTimeWDay] > 6)
|
if ((int)Values[WorldCfg.WeeklyQuestResetTimeWDay] > 6)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.ServerLoading, $"Quests.WeeklyResetDay ({Values[WorldCfg.WeeklyQuestResetTimeWDay]}) must be in range 0..6. Set to 3 (Wednesday).");
|
Log.outError(LogFilter.ServerLoading, $"Quests.WeeklyResetDay ({Values[WorldCfg.WeeklyQuestResetTimeWDay]}) must be in range 0..6. Set to 3 (Wednesday).");
|
||||||
Values[WorldCfg.WeeklyQuestResetTimeWDay] = 3;
|
Values[WorldCfg.WeeklyQuestResetTimeWDay] = 3;
|
||||||
@@ -682,6 +682,13 @@ namespace Game
|
|||||||
Values[WorldCfg.RandomBgResetHour] = 6;
|
Values[WorldCfg.RandomBgResetHour] = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Values[WorldCfg.CalendarDeleteOldEventsHour] = GetDefaultValue("Calendar.DeleteOldEventsHour", 6);
|
||||||
|
if ((int)Values[WorldCfg.CalendarDeleteOldEventsHour] > 23)
|
||||||
|
{
|
||||||
|
Log.outError(LogFilter.Misc, $"Calendar.DeleteOldEventsHour ({Values[WorldCfg.CalendarDeleteOldEventsHour]}) can't be load. Set to 6.");
|
||||||
|
Values[WorldCfg.CalendarDeleteOldEventsHour] = 6;
|
||||||
|
}
|
||||||
|
|
||||||
Values[WorldCfg.GuildResetHour] = GetDefaultValue("Guild.ResetHour", 6);
|
Values[WorldCfg.GuildResetHour] = GetDefaultValue("Guild.ResetHour", 6);
|
||||||
if ((int)Values[WorldCfg.GuildResetHour] > 23)
|
if ((int)Values[WorldCfg.GuildResetHour] > 23)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2285,6 +2285,10 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"Id: {GetId()} Name: '{GetSpellInfo().SpellName[Global.WorldMgr.GetDefaultDbcLocale()]}' Caster: {GetCasterGUID()}\nOwner: {(GetOwner() != null ? GetOwner().GetDebugInfo() : "NULL")}";
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public SpellInfo GetSpellInfo() { return m_spellInfo; }
|
public SpellInfo GetSpellInfo() { return m_spellInfo; }
|
||||||
|
|||||||
@@ -7350,6 +7350,11 @@ namespace Game.Spells
|
|||||||
m_caster.ToUnit().GetSpellHistory().CancelGlobalCooldown(m_spellInfo);
|
m_caster.ToUnit().GetSpellHistory().CancelGlobalCooldown(m_spellInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string GetDebugInfo()
|
||||||
|
{
|
||||||
|
return $"Id: {GetSpellInfo().Id} Name: '{GetSpellInfo().SpellName[Global.WorldMgr.GetDefaultDbcLocale()]}' OriginalCaster: {m_originalCasterGUID} State: {GetState()}";
|
||||||
|
}
|
||||||
|
|
||||||
List<SpellScript> m_loadedScripts = new();
|
List<SpellScript> m_loadedScripts = new();
|
||||||
|
|
||||||
int CalculateDamage(SpellEffectInfo spellEffectInfo, Unit target)
|
int CalculateDamage(SpellEffectInfo spellEffectInfo, Unit target)
|
||||||
|
|||||||
@@ -4266,6 +4266,15 @@ namespace Game.Entities
|
|||||||
spellInfo.AttributesEx2 |= SpellAttr2.CanTargetDead;
|
spellInfo.AttributesEx2 |= SpellAttr2.CanTargetDead;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Soul Sickness (Forge of Souls)
|
||||||
|
ApplySpellFix(new[] { 69131 }, spellInfo =>
|
||||||
|
{
|
||||||
|
ApplySpellEffectFix(spellInfo, 1, spellEffectInfo =>
|
||||||
|
{
|
||||||
|
spellEffectInfo.ApplyAuraName = AuraType.ModDecreaseSpeed;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
// FIRELANDS SPELLS
|
// FIRELANDS SPELLS
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ namespace Scripts.Spells.Druid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 48517 Eclipse (Solar) + 48518 Eclipse (Lunar)
|
[Script] // 48517 Eclipse (Solar) + 48518 Eclipse (Lunar)
|
||||||
class spell_dru_eclipse_aura : AuraScript
|
class spell_dru_eclipse_aura : AuraScript
|
||||||
{
|
{
|
||||||
public override bool Validate(SpellInfo spellInfo)
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
@@ -262,7 +262,7 @@ namespace Scripts.Spells.Druid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 79577 - Eclipse - SPELL_DRUID_ECLIPSE_DUMMY
|
[Script] // 79577 - Eclipse - SPELL_DRUID_ECLIPSE_DUMMY
|
||||||
class spell_dru_eclipse_dummy : AuraScript
|
class spell_dru_eclipse_dummy : AuraScript
|
||||||
{
|
{
|
||||||
class InitializeEclipseCountersEvent : BasicEvent
|
class InitializeEclipseCountersEvent : BasicEvent
|
||||||
@@ -353,7 +353,7 @@ namespace Scripts.Spells.Druid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 329910 - Eclipse out of combat - SPELL_DRUID_ECLIPSE_OOC
|
[Script] // 329910 - Eclipse out of combat - SPELL_DRUID_ECLIPSE_OOC
|
||||||
class spell_dru_eclipse_ooc : AuraScript
|
class spell_dru_eclipse_ooc : AuraScript
|
||||||
{
|
{
|
||||||
public override bool Validate(SpellInfo spellInfo)
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
|
|||||||
Reference in New Issue
Block a user