This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: New Custom Stat Question  (Read 1071 times)

areallycoolguy14

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 2
    • View Profile
New Custom Stat Question
« on: June 11, 2016, 02:17:10 am »
Hello,

I'm modding 3.3.5 on TrinityCore.

I've added a new stat serverside for players/units in the game.  It appears to be working fine, however, I'm confused about how to display the stat in the character paper doll panel.  Looking at PaperDollFrame.lua, it appears to be displaying the player's stats (i.e. Strength, Agility, Intelligence, etc.) using a function in the WoW API called UnitStat.  However, when I try to use this function to reference my new custom stat (referencing it by the next index up which is 6 since it is the 6th stat I'm assuming), it fails without error.  Does anybody know if there is a way for me to get the custom stat that I added to the player/unit from within the client?

Thanks for any help, I enjoy this forum very much.
-Jason
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: New Custom Stat Question
« Reply #1 on: June 11, 2016, 09:37:54 am »
I'm not sure if it possible by just adding it to the server. I imagine that you would need to send it from server to client which means modifying some packets which needs the client source. As you probably know: We don't have the client source.

You could probably use AIO from Rochet2 to show it on the client side, but then you need to tell your players to always activate the AIO addon.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

areallycoolguy14

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 2
    • View Profile
Re: New Custom Stat Question
« Reply #2 on: June 11, 2016, 07:17:56 pm »
Thank you for your response.  I looked into the AIO addon you mentioned.  That looks very promising.  I will give it a try and see if it will work.  Thanks for showing me that, I did not know that that existed.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: New Custom Stat Question
« Reply #3 on: June 11, 2016, 10:37:36 pm »
Quote from: "areallycoolguy14"
Thank you for your response.  I looked into the AIO addon you mentioned.  That looks very promising.  I will give it a try and see if it will work.  Thanks for showing me that, I did not know that that existed.
If you find out that you can modify your character screen with AIO directly (instead of creating a new window and show it), please tell me how! Need to do this soon too! :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »