Derlexy
Intermediate OT User
- Joined
- Jun 29, 2011
- Messages
- 219
- Reaction score
- 101
Hello... Im working on new item attributes to my server. I got everything working so far, and now i got a problem: not all attributes from items are being saved when player logout/login.
Before logout:
After login:
While in game, all the attributes are working fine. Even the effects of the attributes are working fine. The problem is only when i logout and login back. Looks like the items attributes (all of them) are not being saved into dabatase, only some...
My attribute list at enum.h:
Not posting everything, but i changed several other pieces of code to have attributes working. I pretty sure that it has something to do about the item saving on database, or something related, like not all the attributes being saved on blob field at database... Can someone help me?
Obs: TFS 1.2 (Nostalrius)
Before logout:
Code:
20:26 You see a magic sword +5 (Atk:48 Def:37).
Item Class 4.
It weighs 42.00 oz.
It's the Sword of Valor.
[Attributes]
Defense +2
Speed +3
Mana +50
Magic +1
ItemID: [3288].
Position: [X: 32347] [Y: 32215] [Z: 7].
After login:
Code:
20:27 You see a magic sword +5 (Atk:48 Def:37).
Item Class 4.
It weighs 42.00 oz.
It's the Sword of Valor.
[Attributes]
Defense +2
Speed +3
ItemID: [3288].
Position: [X: 32347] [Y: 32215] [Z: 7].
While in game, all the attributes are working fine. Even the effects of the attributes are working fine. The problem is only when i logout and login back. Looks like the items attributes (all of them) are not being saved into dabatase, only some...
My attribute list at enum.h:
C++:
enum itemAttrTypes : uint64_t {
ITEM_ATTRIBUTE_NONE,
ITEM_ATTRIBUTE_ACTIONID = 1 << 0,
ITEM_ATTRIBUTE_MOVEMENTID = 1 << 1,
ITEM_ATTRIBUTE_DESCRIPTION = 1 << 2,
ITEM_ATTRIBUTE_TEXT = 1 << 3,
ITEM_ATTRIBUTE_DATE = 1 << 4,
ITEM_ATTRIBUTE_WRITER = 1 << 5,
ITEM_ATTRIBUTE_NAME = 1 << 6,
ITEM_ATTRIBUTE_ARTICLE = 1 << 7,
ITEM_ATTRIBUTE_PLURALNAME = 1 << 8,
ITEM_ATTRIBUTE_WEIGHT = 1 << 9,
ITEM_ATTRIBUTE_ATTACK = 1 << 10,
ITEM_ATTRIBUTE_DEFENSE = 1 << 11,
ITEM_ATTRIBUTE_ARMOR = 1 << 12,
ITEM_ATTRIBUTE_SHOOTRANGE = 1 << 13,
ITEM_ATTRIBUTE_OWNER = 1 << 14,
ITEM_ATTRIBUTE_DURATION = 1 << 15,
ITEM_ATTRIBUTE_DECAYSTATE = 1 << 16,
ITEM_ATTRIBUTE_CORPSEOWNER = 1 << 17,
ITEM_ATTRIBUTE_CHARGES = 1 << 18,
ITEM_ATTRIBUTE_FLUIDTYPE = 1 << 19,
ITEM_ATTRIBUTE_DOORID = 1 << 20,
ITEM_ATTRIBUTE_KEYNUMBER = 1 << 21,
ITEM_ATTRIBUTE_KEYHOLENUMBER = 1 << 22,
ITEM_ATTRIBUTE_DOORQUESTNUMBER = 1 << 23,
ITEM_ATTRIBUTE_DOORQUESTVALUE = 1 << 24,
ITEM_ATTRIBUTE_DOORLEVEL = 1 << 25,
ITEM_ATTRIBUTE_CHESTQUESTNUMBER = 1 << 26,
ITEM_ATTRIBUTE_ITEMCLASS = 1 << 27,
ITEM_ATTRIBUTE_UPGRADES = 1 << 28,
ITEM_ATTRIBUTE_UPG_ATTACK = 1 << 29,
ITEM_ATTRIBUTE_UPG_DEFENSE = 1 << 30,
ITEM_ATTRIBUTE_UPG_ARMOR = static_cast<uint64_t>(1) << 31,
ITEM_ATTRIBUTE_UPG_SPEED = static_cast<uint64_t>(1) << 32,
ITEM_ATTRIBUTE_UPG_LEAN = static_cast<uint64_t>(1) << 33,
ITEM_ATTRIBUTE_UPG_CAPACITY = static_cast<uint64_t>(1) << 34,
ITEM_ATTRIBUTE_UPG_RANGE = static_cast<uint64_t>(1) << 35,
ITEM_ATTRIBUTE_UPG_HEALTH = static_cast<uint64_t>(1) << 36,
ITEM_ATTRIBUTE_UPG_MANA = static_cast<uint64_t>(1) << 37,
ITEM_ATTRIBUTE_UPG_MAGIC = static_cast<uint64_t>(1) << 38,
ITEM_ATTRIBUTE_UPG_SWORD = static_cast<uint64_t>(1) << 39,
ITEM_ATTRIBUTE_UPG_AXE = static_cast<uint64_t>(1) << 40,
ITEM_ATTRIBUTE_UPG_CLUB = static_cast<uint64_t>(1) << 41,
ITEM_ATTRIBUTE_UPG_SHIELD = static_cast<uint64_t>(1) << 42,
ITEM_ATTRIBUTE_UPG_DISTANCE = static_cast<uint64_t>(1) << 43,
};
Not posting everything, but i changed several other pieces of code to have attributes working. I pretty sure that it has something to do about the item saving on database, or something related, like not all the attributes being saved on blob field at database... Can someone help me?
Obs: TFS 1.2 (Nostalrius)
Last edited: