-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove weird debug messages in Lifter and Toughness RAs
- Loading branch information
Showing
2 changed files
with
34 additions
and
59 deletions.
There are no files selected for viewing
68 changes: 29 additions & 39 deletions
68
GameServer/realmabilities_atlasOF/handlers/AtlasOF_LifterAbility.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,50 @@ | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using DOL.Database; | ||
using DOL.GS.Effects; | ||
using DOL.GS.PacketHandler; | ||
using DOL.Language; | ||
|
||
namespace DOL.GS.RealmAbilities | ||
{ | ||
/// <summary> | ||
/// Lifter : 20% additional maximum carrying capacity per level. | ||
/// </summary> | ||
public class AtlasOF_LifterAbility : RAPropertyEnhancer | ||
/// <summary> | ||
/// Lifter : 20% additional maximum carrying capacity per level. | ||
/// </summary> | ||
public class AtlasOF_LifterAbility : RAPropertyEnhancer | ||
{ | ||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
|
||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
protected override string ValueUnit => "%"; | ||
|
||
// TODO: Chek if this should be changed to eProperty.Strength | ||
public AtlasOF_LifterAbility(DbAbility dba, int level) : base(dba, level, eProperty.Undefined) { } | ||
|
||
protected override string ValueUnit { get { return "%"; } } | ||
public AtlasOF_LifterAbility(DbAbility dba, int level) : base(dba, level, eProperty.Undefined) { } | ||
|
||
public override int CostForUpgrade(int level) { return AtlasRAHelpers.GetCommonUpgradeCostFor5LevelsRA(level); } | ||
public override int CostForUpgrade(int level) | ||
{ | ||
return AtlasRAHelpers.GetCommonUpgradeCostFor5LevelsRA(level); | ||
} | ||
|
||
public override int GetAmountForLevel(int level) | ||
{ | ||
if (level < 1) return 0; | ||
|
||
return level * 20; | ||
} | ||
public override int GetAmountForLevel(int level) | ||
{ | ||
return level < 1 ? 0 : level * 20; | ||
} | ||
|
||
public override void Activate(GameLiving living, bool sendUpdates) | ||
{ | ||
base.Activate(living, sendUpdates); | ||
|
||
// force UI to refresh encumberence value | ||
if (living is GamePlayer player) { log.Warn("INSIDE Activate"); player.Out.SendEncumberance(); } | ||
base.Activate(living, sendUpdates); | ||
|
||
} | ||
if (living is GamePlayer player) | ||
player.Out.SendEncumberance(); | ||
} | ||
|
||
public override void Deactivate(GameLiving living, bool sendUpdates) | ||
public override void Deactivate(GameLiving living, bool sendUpdates) | ||
{ | ||
base.Deactivate(living, sendUpdates); | ||
base.Deactivate(living, sendUpdates); | ||
|
||
// force UI to refresh encumberence value | ||
if (living is GamePlayer player) { log.Warn("INSIDE Deactivate"); player.Out.SendEncumberance(); } | ||
} | ||
if (living is GamePlayer player) | ||
player.Out.SendEncumberance(); | ||
} | ||
|
||
public override void OnLevelChange(int oldLevel, int newLevel = 0) | ||
{ | ||
base.OnLevelChange(oldLevel, newLevel); | ||
|
||
// force UI to refresh encumberence value | ||
if (base.m_activeLiving is GamePlayer player) { log.Warn("INSIDE OnLevelChange"); player.Out.SendEncumberance(); } | ||
{ | ||
base.OnLevelChange(oldLevel, newLevel); | ||
|
||
} | ||
|
||
if (m_activeLiving is GamePlayer player) | ||
player.Out.SendEncumberance(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters