Income

Users who are viewing this thread

That function only has inner function that calculates financial things. I need to fidn where they used. They are called daily somewhere which I have to remove and add them as called weekly somehow. :confused:

C#:
private void DailyTick()
        {
            foreach (Kingdom kingdom in Kingdom.All)
            {
                foreach (KingdomTribute kingdomTribute in kingdom.KingdomTributes)
                {
                    float num = 0f;
                    foreach (Clan clan in kingdom.Clans)
                    {
                        ExplainedNumber explainedNumber = new ExplainedNumber(0f, null);
                        Campaign.Current.Models.ClanFinanceModel.CalculateClanIncome(clan, ref explainedNumber, false);
                        float num2 = explainedNumber.ResultNumber / 100f * kingdomTribute.Percentage;
                        num += num2;
                    }
                    GiveGoldToClanAction.ApplyFromHeroToClan(null, kingdomTribute.KingdomToPay.RulingClan, (int)num);
                }
            }
        }

This is in TaleWorlds.CampaignSystem.Sandbox.CampaignBehaviors
 
Upvote 0
If you're using net reflector, you can follow the reference tree so you can see what it's being used by. I'm sure there's something similar for whatever decompiler you use.
 
Upvote 0
Would it work if I just override this method and empty inside Daily Tick and create same for Weekly and bind it to weekly?

edit: Didnt work. ?
 
Upvote 0
Back
Top Bottom