mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 04:11:30 +00:00
[Bug Fix] Fix Character Recast Type -1 saving to database. (#1598)
This commit is contained in:
parent
5d522b149b
commit
07d96ad921
@ -482,7 +482,7 @@ namespace EQ
|
||||
uint32 Haste;
|
||||
uint32 DamageShield;
|
||||
uint32 RecastDelay;
|
||||
uint32 RecastType;
|
||||
int RecastType;
|
||||
uint32 AugDistiller;
|
||||
bool Attuneable;
|
||||
bool NoPet;
|
||||
|
||||
@ -1118,7 +1118,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
||||
item.Haste = (uint32)atoul(row[ItemField::haste]);
|
||||
item.DamageShield = (uint32)atoul(row[ItemField::damageshield]);
|
||||
item.RecastDelay = (uint32)atoul(row[ItemField::recastdelay]);
|
||||
item.RecastType = (uint32)atoul(row[ItemField::recasttype]);
|
||||
item.RecastType = (int)atoi(row[ItemField::recasttype]);
|
||||
item.GuildFavor = (uint32)atoul(row[ItemField::guildfavor]);
|
||||
item.AugDistiller = (uint32)atoul(row[ItemField::augdistiller]);
|
||||
item.Attuneable = (atoi(row[ItemField::attuneable]) == 0) ? false : true;
|
||||
|
||||
@ -1338,7 +1338,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
bool fromaug = false;
|
||||
EQ::ItemData* augitem = nullptr;
|
||||
uint32 recastdelay = 0;
|
||||
uint32 recasttype = 0;
|
||||
int recasttype = 0;
|
||||
|
||||
while (true) {
|
||||
if (item == nullptr)
|
||||
@ -1378,8 +1378,13 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
{
|
||||
//Can we start the timer here? I don't see why not.
|
||||
CastToClient()->GetPTimers().Start((pTimerItemStart + recasttype), recastdelay);
|
||||
database.UpdateItemRecastTimestamps(CastToClient()->CharacterID(), recasttype,
|
||||
CastToClient()->GetPTimers().Get(pTimerItemStart + recasttype)->GetReadyTimestamp());
|
||||
if (recasttype != -1) {
|
||||
database.UpdateItemRecastTimestamps(
|
||||
CastToClient()->CharacterID(),
|
||||
recasttype,
|
||||
CastToClient()->GetPTimers().Get(pTimerItemStart + recasttype)->GetReadyTimestamp()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2539,9 +2544,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
|
||||
if(itm && itm->GetItem()->RecastDelay > 0){
|
||||
auto recast_type = itm->GetItem()->RecastType;
|
||||
CastToClient()->GetPTimers().Start((pTimerItemStart + recast_type), itm->GetItem()->RecastDelay);
|
||||
database.UpdateItemRecastTimestamps(
|
||||
CastToClient()->CharacterID(), recast_type,
|
||||
CastToClient()->GetPTimers().Get(pTimerItemStart + recast_type)->GetReadyTimestamp());
|
||||
if (recast_type != -1) {
|
||||
database.UpdateItemRecastTimestamps(
|
||||
CastToClient()->CharacterID(),
|
||||
recast_type,
|
||||
CastToClient()->GetPTimers().Get(pTimerItemStart + recast_type)->GetReadyTimestamp()
|
||||
);
|
||||
}
|
||||
auto outapp = new EQApplicationPacket(OP_ItemRecastDelay, sizeof(ItemRecastDelay_Struct));
|
||||
ItemRecastDelay_Struct *ird = (ItemRecastDelay_Struct *)outapp->pBuffer;
|
||||
ird->recast_delay = itm->GetItem()->RecastDelay;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user