Cannot find something in code driving me nuts.

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

Cannot find something in code driving me nuts.

Postby scrubtasticx » Sun Oct 18, 2015 2:48 pm

So i have zone bonuses on and setup all works properly accept the way it displays the amount in the chat window LOL i have looked at all the zone bonus code. AND the language file. The regular experience and group bonus things work you get 300,201 experience the zone bonus says 300210 additional no ,'s separating the numbers. The ONLY spot i found output of any kind was in Language/EN world.txt
Code: Select all
# ZONE BONUSES ZoneBonus.AdditionalXP: You gain an additional {0} experience for adventuring in this zone! ZoneBonus.AdditionalRP: You gain an additional {0} realmpoints for adventuring in this zone! ZoneBonus.AdditionalBP: You gain an additional {0} bountypoints for adventuring in this zone! ZoneBonus.AdditionalCoin: You gain additional coins for adventuring in this zone!
If anyone can shine some light on this as i am more of a database guy more then a code guy, I would appreciate it greatly Thanks.
scrubtasticx
DOL Visitor
 
Posts: 11
Joined: Thu Jan 17, 2013 12:24 am

Re: Cannot find something in code driving me nuts.

Postby Urza » Sun Oct 18, 2015 4:19 pm

--> ZoneBonus.cs, GamePlayer.cs and GameNPC.cs

ENABLE_ZONE_BONUSES
User avatar
Urza
Developer
 
Posts: 671
Joined: Sun Jan 23, 2005 11:15 am
Website: http://www.juwesch.eu
Location: Germany/Delitzsch

Re: Cannot find something in code driving me nuts.

Postby scrubtasticx » Sun Oct 18, 2015 5:36 pm

Ok after looking in the gameplayer.cs and that method in there i changes the zonebonus.cs to THIS and baaam it works properly now. ;P
Code: Select all
/* * DAWN OF LIGHT - The first free open source DAoC server emulator * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ using System; using System.Collections.Generic; using System.Text; using DOL.Database; using DOL.GS.PacketHandler; using log4net; using System.Reflection; using DOL.GS.PlayerClass; using DOL.Language; namespace DOL.GS { public class ZoneBonus { private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); #region eZoneBonusType public enum eZoneBonusType { XP = 0, RP = 1, BP = 2, COIN = 3, } #endregion #region Get Bonuses Methods public static int GetXPBonus(GamePlayer player) { return player.CurrentZone.BonusExperience; } public static int GetRPBonus(GamePlayer player) { return player.CurrentZone.BonusRealmpoints; } public static int GetBPBonus(GamePlayer player) { return player.CurrentZone.BonusBountypoints; } public static int GetCoinBonus(GamePlayer player) { return player.CurrentZone.BonusCoin; } #endregion #region Get Bonus Message public static string GetBonusMessage(GamePlayer player, int bonusAmount, eZoneBonusType type) { System.Globalization.NumberFormatInfo format = System.Globalization.NumberFormatInfo.InvariantInfo; string totalExpStr = bonusAmount.ToString("N0", format); switch (type) { case eZoneBonusType.XP: return LanguageMgr.GetTranslation(player.Client.Account.Language, "ZoneBonus.AdditionalXP", bonusAmount.ToString("N0", format)); case eZoneBonusType.RP: return LanguageMgr.GetTranslation(player.Client.Account.Language, "ZoneBonus.AdditionalRP", bonusAmount.ToString("N0", format)); case eZoneBonusType.BP: return LanguageMgr.GetTranslation(player.Client.Account.Language, "ZoneBonus.AdditionalBP", bonusAmount.ToString("N0", format)); case eZoneBonusType.COIN: return LanguageMgr.GetTranslation(player.Client.Account.Language, "ZoneBonus.AdditionalCoin"); default: return "No Bonus Type Found"; } } #endregion } }
Thankyou for the where to look :) helped alot
scrubtasticx
DOL Visitor
 
Posts: 11
Joined: Thu Jan 17, 2013 12:24 am


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest