• Visit Rebornbuddy
  • Default ZetaDia.Me.MaxPrimaryResource return resource value without bonuses

    Discussion in 'Community Developer Forum' started by buddy77, Jan 31, 2016.

    1. buddy77

      buddy77 New Member

      Joined:
      Dec 7, 2015
      Messages:
      21
      Likes Received:
      0
      Trophy Points:
      0
      ZetaDia.Me.MaxPrimaryResource always return default player resource. It not include +paragon resource and +items resource.
      We need to know max resource value because we have items with properties based on this value. For example "AQUILA CUIRASS"
      Checked in last beta too - still no changes.
       
      Last edited: Jan 31, 2016
    2. xzjv

      xzjv Community Developer

      Joined:
      Mar 17, 2014
      Messages:
      1,243
      Likes Received:
      46
      Trophy Points:
      48
      yeah DB's property was/is broke, will revert to manual calculation. for reference:

      Code:
                  private float GetMaxPrimaryResource(DiaActivePlayer player)
                  {
                      switch (ActorClass)
                      {
                          case ActorClass.Wizard:
                              return player.CommonData.GetAttribute<float>(149 | (int)ResourceType.Arcanum << 12) + player.CommonData.GetAttribute<float>(ActorAttributeType.ResourceEffectiveMaxArcanum);
                          case ActorClass.Barbarian:
                              return player.CommonData.GetAttribute<float>(149 | (int)ResourceType.Fury << 12) + player.CommonData.GetAttribute<float>(ActorAttributeType.ResourceMaxBonusFury);
                          case ActorClass.Monk:
                              return player.CommonData.GetAttribute<float>(149 | (int)ResourceType.Spirit << 12) + player.CommonData.GetAttribute<float>(ActorAttributeType.ResourceMaxBonusSpirit);
                          case ActorClass.Crusader:
                              return player.CommonData.GetAttribute<float>(149 | (int)ResourceType.Faith << 12) + player.CommonData.GetAttribute<float>(ActorAttributeType.ResourceMaxBonusFaith);
                          case ActorClass.DemonHunter:
                              return player.CommonData.GetAttribute<float>(149 | (int)ResourceType.Hatred << 12) + player.CommonData.GetAttribute<float>(ActorAttributeType.ResourceMaxBonusHatred);
                          case ActorClass.Witchdoctor:
                              return player.CommonData.GetAttribute<float>(149 | (int)ResourceType.Mana << 12) + player.CommonData.GetAttribute<float>(ActorAttributeType.ResourceMaxBonusMana);
                      }
                      return -1;
                  }
      
       
      Last edited: Jan 31, 2016
    3. buddy77

      buddy77 New Member

      Joined:
      Dec 7, 2015
      Messages:
      21
      Likes Received:
      0
      Trophy Points:
      0
      Why this thread again in "community dev" subforum? It's DB bug. Not community problem
       

    Share This Page