Misc fixes.
This commit is contained in:
@@ -477,8 +477,11 @@ namespace Game.Entities
|
||||
val = maxHealth;
|
||||
}
|
||||
|
||||
ulong oldVal = GetHealth();
|
||||
SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Health), val);
|
||||
|
||||
TriggerOnHealthChangeAuras(oldVal, val);
|
||||
|
||||
// group update
|
||||
Player player = ToPlayer();
|
||||
if (player)
|
||||
|
||||
@@ -547,7 +547,7 @@ namespace Game.Entities
|
||||
void LoadStaticPassengers()
|
||||
{
|
||||
uint mapId = (uint)GetGoInfo().MoTransport.SpawnMap;
|
||||
var cells = Global.ObjectMgr.GetMapObjectGuids(mapId, (byte)GetMap().GetDifficultyID());
|
||||
var cells = Global.ObjectMgr.GetMapObjectGuids(mapId, GetMap().GetDifficultyID());
|
||||
if (cells == null)
|
||||
return;
|
||||
foreach (var cell in cells)
|
||||
|
||||
@@ -753,7 +753,7 @@ namespace Game.Garrisons
|
||||
|
||||
if (go.GetGoType() == GameObjectTypes.GarrisonBuilding && go.GetGoInfo().garrisonBuilding.SpawnMap != 0)
|
||||
{
|
||||
foreach (var cellGuids in Global.ObjectMgr.GetMapObjectGuids((uint)go.GetGoInfo().garrisonBuilding.SpawnMap, (byte)map.GetDifficultyID()))
|
||||
foreach (var cellGuids in Global.ObjectMgr.GetMapObjectGuids((uint)go.GetGoInfo().garrisonBuilding.SpawnMap, map.GetDifficultyID()))
|
||||
{
|
||||
foreach (var spawnId in cellGuids.Value.creatures)
|
||||
{
|
||||
|
||||
@@ -50,19 +50,9 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
if (packet.ChannelName.Length > 31)
|
||||
{
|
||||
ChannelNotify channelNotify = new();
|
||||
channelNotify.Type = ChatNotify.InvalidNameNotice;
|
||||
channelNotify.Channel = packet.ChannelName;
|
||||
SendPacket(channelNotify);
|
||||
Log.outError(LogFilter.Network, $"Player {GetPlayer().GetGUID()} tried to create a channel with a name more than 31 characters long - blocked");
|
||||
return;
|
||||
}
|
||||
|
||||
if (packet.Password.Length > 127)
|
||||
{
|
||||
Log.outError(LogFilter.Network, $"Player {GetPlayer().GetGUID()} tried to create a channel with a password more that 127 characters long - blocked");
|
||||
Log.outError(LogFilter.Network, $"Player {GetPlayer().GetGUID()} tried to create a channel with a password more than 127 characters long - blocked");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -79,6 +69,12 @@ namespace Game
|
||||
else
|
||||
{
|
||||
// custom channel
|
||||
if (packet.ChannelName.Length > 31)
|
||||
{
|
||||
Log.outError(LogFilter.Network, $"Player {GetPlayer().GetGUID()} tried to create a channel with a name more than 31 characters long - blocked");
|
||||
return;
|
||||
}
|
||||
|
||||
Channel channel = cMgr.GetCustomChannel(packet.ChannelName);
|
||||
if (channel != null)
|
||||
channel.JoinChannel(GetPlayer(), packet.Password);
|
||||
|
||||
@@ -3121,13 +3121,12 @@ namespace Game.Maps
|
||||
|
||||
public void SaveRespawnInfoDB(RespawnInfo info, SQLTransaction dbTrans = null)
|
||||
{
|
||||
// Just here for support of compatibility mode
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.REP_RESPAWN);
|
||||
stmt.AddValue(0, (ushort)info.type);
|
||||
stmt.AddValue(0, info.spawnId);
|
||||
stmt.AddValue(1, info.respawnTime);
|
||||
stmt.AddValue(2, GetId());
|
||||
stmt.AddValue(3, GetInstanceId());
|
||||
stmt.AddValue(1, info.spawnId);
|
||||
stmt.AddValue(2, info.respawnTime);
|
||||
stmt.AddValue(3, GetId());
|
||||
stmt.AddValue(4, GetInstanceId());
|
||||
DB.Characters.ExecuteOrAppend(dbTrans, stmt);
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Game
|
||||
if (activeCount != pool.numActive)
|
||||
{
|
||||
doRegenerate = true;
|
||||
Log.outError(LogFilter.Sql, "Table `pool_quest_save` has %u active members saved for pool %u, which requests %u active members. Pool spawns re-generated.", activeCount, pool.poolId, pool.numActive);
|
||||
Log.outError(LogFilter.Sql, $"Table `pool_quest_save` has {activeCount} active members saved for pool {pool.poolId}, which requests {pool.numActive} active members. Pool spawns re-generated.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,13 +242,12 @@ namespace Game
|
||||
{
|
||||
foreach (uint quest in pool.members[memberKey])
|
||||
{
|
||||
QuestPool refe = _poolLookup[quest];
|
||||
if (refe != null)
|
||||
if (_poolLookup.ContainsKey(quest))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `quest_pool_members` lists quest %u as member of pool %u, but it is already a member of pool %u. Skipped.", quest, pool.poolId, refe.poolId);
|
||||
Log.outError(LogFilter.Sql, $"Table `quest_pool_members` lists quest {quest} as member of pool {pool.poolId}, but it is already a member of pool {_poolLookup[quest].poolId}. Skipped.");
|
||||
continue;
|
||||
}
|
||||
refe = pool;
|
||||
_poolLookup[quest] = pool;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -991,6 +991,12 @@ namespace Game
|
||||
// Whether to use LoS from game objects
|
||||
Values[WorldCfg.CheckGobjectLos] = GetDefaultValue("CheckGameObjectLoS", true);
|
||||
|
||||
// FactionBalance
|
||||
Values[WorldCfg.FactionBalanceLevelCheckDiff] = GetDefaultValue("Pvp.FactionBalance.LevelCheckDiff", 0);
|
||||
Values[WorldCfg.CallToArms5Pct] = GetDefaultValue("Pvp.FactionBalance.Pct5", 0.6f);
|
||||
Values[WorldCfg.CallToArms10Pct] = GetDefaultValue("Pvp.FactionBalance.Pct10", 0.7f);
|
||||
Values[WorldCfg.CallToArms20Pct] = GetDefaultValue("Pvp.FactionBalance.Pct20", 0.8f);
|
||||
|
||||
// call ScriptMgr if we're reloading the configuration
|
||||
if (reload)
|
||||
Global.ScriptMgr.OnConfigLoad(reload);
|
||||
|
||||
@@ -3309,6 +3309,7 @@ namespace Game.Spells
|
||||
case 61716: // Rabbit Costume
|
||||
case 61734: // Noblegarden Bunny
|
||||
case 62344: // Fists of Stone
|
||||
case 50344: // Dream Funnel
|
||||
case 61819: // Manabonked! (item)
|
||||
case 61834: // Manabonked! (minigob)
|
||||
case 73523: // Rigor Mortis
|
||||
|
||||
Reference in New Issue
Block a user