Skip to content

Commit

Permalink
AtlasROGManager.GenerateOrbAmount: Remove debug message sent to player
Browse files Browse the repository at this point in the history
  • Loading branch information
bm01 committed Nov 7, 2024
1 parent 9fbc727 commit 616d073
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion GameServer/gameobjects/GamePlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ int CalculateNextInterval()

private void Quit()
{
if ((eCharacterClass) _owner.CharacterClass.ID is eCharacterClass.Necromancer && _owner.IsShade)
if ((eCharacterClass) _owner.CharacterClass.ID is eCharacterClass.Necromancer && _owner.IsShade)
_owner.Shade(false);

_owner.Out.SendPlayerQuit(false);
Expand Down
21 changes: 7 additions & 14 deletions GameServer/managers/RandomObjectGeneration/AtlasROGManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,32 +156,25 @@ private static void GenerateBPs(GameLiving living, int amount)
player.Out.SendMessage($"You gained an additional {Convert.ToInt32(relicBonus)} BPs due to your realm's relic ownership!", eChatType.CT_Important, eChatLoc.CL_SystemWindow);

}

}

public static void GenerateOrbAmount(GameLiving living, int amount)
{
if (amount == 0) return;
if (amount == 0)
return;

if (living != null && living is GamePlayer)
if (living is GamePlayer player)
{
var player = living as GamePlayer;

var orbs = GameServer.Database.FindObjectByKey<DbItemTemplate>(_currencyID);

DbItemTemplate orbs = GameServer.Database.FindObjectByKey<DbItemTemplate>(_currencyID);

if (orbs == null)
{
player.Out.SendMessage("Error: Currency ID not found!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return;
}

DbInventoryItem item = GameInventoryItem.Create(orbs);

double numCurrentLoyalDays = LoyaltyManager.GetPlayerRealmLoyalty(player) != null ? LoyaltyManager.GetPlayerRealmLoyalty(player).Days : 0;

if(numCurrentLoyalDays >= 30)
{
if (numCurrentLoyalDays >= 30)
numCurrentLoyalDays = 30;
}

var loyaltyBonus = ((amount * .2) * (numCurrentLoyalDays / 30));

Expand Down

0 comments on commit 616d073

Please sign in to comment.