mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
[Bug Fix] Correct type signed/unsigned int when reading item from database in shareddb (#2269)
* Correct database reads from unsigned to signed integer for item regen, manaregen, endur, and enduranceregen * Correct item database read for Click.Effect from unsigned to signed int
This commit is contained in:
parent
be00aa1b60
commit
cb95251c68
@ -1091,11 +1091,11 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
|||||||
|
|
||||||
// Health, Mana, and Endurance
|
// Health, Mana, and Endurance
|
||||||
item.HP = std::stoi(row[ItemField::hp]);
|
item.HP = std::stoi(row[ItemField::hp]);
|
||||||
item.Regen = std::stoul(row[ItemField::regen]);
|
item.Regen = std::stoi(row[ItemField::regen]);
|
||||||
item.Mana = std::stoi(row[ItemField::mana]);
|
item.Mana = std::stoi(row[ItemField::mana]);
|
||||||
item.ManaRegen = std::stoul(row[ItemField::manaregen]);
|
item.ManaRegen = std::stoi(row[ItemField::manaregen]);
|
||||||
item.Endur = std::stoul(row[ItemField::endur]);
|
item.Endur = std::stoi(row[ItemField::endur]);
|
||||||
item.EnduranceRegen = std::stoul(row[ItemField::enduranceregen]);
|
item.EnduranceRegen = std::stoi(row[ItemField::enduranceregen]);
|
||||||
|
|
||||||
// Bane Damage
|
// Bane Damage
|
||||||
item.BaneDmgAmt = std::stoi(row[ItemField::banedmgamt]);
|
item.BaneDmgAmt = std::stoi(row[ItemField::banedmgamt]);
|
||||||
@ -1212,7 +1212,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
|||||||
// Click Effect
|
// Click Effect
|
||||||
item.CastTime = std::stoul(row[ItemField::casttime]);
|
item.CastTime = std::stoul(row[ItemField::casttime]);
|
||||||
item.CastTime_ = std::stoi(row[ItemField::casttime_]);
|
item.CastTime_ = std::stoi(row[ItemField::casttime_]);
|
||||||
item.Click.Effect = std::stoul(row[ItemField::clickeffect]);
|
item.Click.Effect = std::stoi(row[ItemField::clickeffect]);
|
||||||
item.Click.Type = static_cast<uint8>(std::stoul(row[ItemField::clicktype]));
|
item.Click.Type = static_cast<uint8>(std::stoul(row[ItemField::clicktype]));
|
||||||
item.Click.Level = static_cast<uint8>(std::stoul(row[ItemField::clicklevel]));
|
item.Click.Level = static_cast<uint8>(std::stoul(row[ItemField::clicklevel]));
|
||||||
item.Click.Level2 = static_cast<uint8>(std::stoul(row[ItemField::clicklevel2]));
|
item.Click.Level2 = static_cast<uint8>(std::stoul(row[ItemField::clicklevel2]));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user