In-game stats dont match my DB menu

User Tag List

Results 1 to 3 of 3
  1. #1
    brendan18's Avatar Member
    Reputation
    1
    Join Date
    Mar 2011
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    In-game stats dont match my DB

    So i was working on a self compiled 3.3.5 trinitycore server for a couple days now. Basically only mad a couple NPCs and items and everything was going fine then i remembered i forgot to remove the 32k stat cap. So i went and changed the Smallint to Int in the DB under item_template. Then i went to \src\server\game\Globals--> ObjectMgr.cpp and edited the line:
    itemTemplate.ItemStat[i].ItemStatValue = int32(fields[29 + i * 4 + 1].GetInt16());

    to
    itemTemplate.ItemStat[i].ItemStatValue = int32(fields[29 + i * 4 + 1].GetInt32());


    Then "recompiled" (rebuilt in VS and then edit the world and auth config files back to my mysql settings. Then ran the Worldserver.exe and auth.exe) (not sure if thats how you go about recompiling so that might be the issue)
    everything ran smoothly with world and auth so i went back into game and all my items that once had stats like 20000-22000 dmg +2500 stam +2500 str +2500 Agi now have incorrect stats. (generally extremely low compared to what they were) Now all the items i have created have stats like 25 stam 7 Agi 24 str (low stats) yet in the DB under Item_template they have the correct 2500 stats just not in game.

    Also all items are now Gray(quality) and weapons that had like 500-100 haste now have like 22k+

    I backed up all my items and NPCs b4 "recompiling" because i've never don't it b4 so didn't knw if i would lose everything so ill put the SQL of one of the weps that don't work


    Code:
    INSERT INTO `item_template` (`entry`, `class`, `subclass`, `name`, `displayid`, `InventoryType`, `RequiredLevel`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `delay`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `description`, `Material`, `sheath`, `itemset`, `MaxDurability`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `VerifiedBuild`) VALUES (600001, 2, 8, 'The True Frostmourne', 46609, 17, 255, 10, 3, 100000, 7, 100000, 4, 100000, 32, 100000, 31, 100000, 36, 5000, 38, 100000, 0, 0, 0, 0, 0, 0, 75000, 80000, 0, 0, 0, 0, 2000, 0, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 'Hail to the King!', 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    I'm evidently not that great with this stuff but i have been working with Trinitycore long enough to where i usually find the problem myself b4 someone on a post would answer me but i'm lost so any help would be greatly appreciated. Im sure i just compiled wrong lol
    But at the same time i have no also deleted the world auth and character DB in HeidiSQL and rebuild them in the world server then imported all my items and NPCs again and in the DB it shows the correct stats but when i go in game the items have the "low" stats

    Thanks in advance,
    Infert

    Uploaded a pic of an item (ingame) and my DB and they're so far from being correct
    Imgur: The most awesome images on the Internet

    Also have tried changing the stat count so the actual amount of stats even tho thats never been an issue so i just leave it at 10.

    Dam i really must of screwed something up just realized that the haste on all weps are = to the weapons mindmg for some odd reason. WHAT DID I DO? lmao :confused:
    Last edited by brendan18; 05-22-2016 at 09:43 AM. Reason: added pic and didnt pick Prefix sorry

    In-game stats dont match my DB
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I believe this part is the problem:

    Code:
    fields[29 + i * 4 + 1]
    It looks like it needs to be updated to the size of the 32 bit data now, since it was 16 bit before. You are trying to get 32 bits out of 16 bits, giving you the weirdly different number.

    I could be wrong - this just looks to be the issue from a quick glance.

  3. Thanks brendan18 (1 members gave Thanks to stoneharry for this useful post)
  4. #3
    brendan18's Avatar Member
    Reputation
    1
    Join Date
    Mar 2011
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    I believe this part is the problem:

    Code:
    fields[29 + i * 4 + 1]
    It looks like it needs to be updated to the size of the 32 bit data now, since it was 16 bit before. You are trying to get 32 bits out of 16 bits, giving you the weirdly different number.

    I could be wrong - this just looks to be the issue from a quick glance.
    That was it, i changed it to [29 + i*2] recompiled and everything was back to normal. Thank you so much Stoneharry!!!

Similar Threads

  1. [Help] End-game Stats/Gear for Barb
    By Fishoo in forum Diablo 3 General
    Replies: 5
    Last Post: 07-08-2012, 03:36 PM
  2. [Database] Some edited items in-game stats not changing in Ascent database
    By Achay in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 09-24-2010, 05:41 AM
  3. In-game stat modification?
    By viralbug in forum World of Warcraft General
    Replies: 3
    Last Post: 03-21-2008, 02:51 PM
  4. WoW Game Stats
    By Solance in forum Community Chat
    Replies: 0
    Last Post: 11-30-2006, 02:12 AM
All times are GMT -5. The time now is 07:48 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search