mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
Merge pull request #862 from fryguy503/tradeskill_lockout
Container lock inconsistent state fix
This commit is contained in:
commit
585c07210d
@ -443,6 +443,14 @@ bool Object::Process(){
|
|||||||
if(m_ground_spawn && respawn_timer.Check()){
|
if(m_ground_spawn && respawn_timer.Check()){
|
||||||
RandomSpawn(true);
|
RandomSpawn(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user != nullptr && !entity_list.GetClientByCharID(user->CharacterID())) {
|
||||||
|
m_inuse = false;
|
||||||
|
last_user = user;
|
||||||
|
user->SetTradeskillObject(nullptr);
|
||||||
|
user = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,7 +562,6 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
|||||||
ClickObjectAction_Struct* coa = (ClickObjectAction_Struct*)outapp->pBuffer;
|
ClickObjectAction_Struct* coa = (ClickObjectAction_Struct*)outapp->pBuffer;
|
||||||
|
|
||||||
//TODO: there is prolly a better way to do this.
|
//TODO: there is prolly a better way to do this.
|
||||||
m_inuse = true;
|
|
||||||
coa->type = m_type;
|
coa->type = m_type;
|
||||||
coa->unknown16 = 0x0a;
|
coa->unknown16 = 0x0a;
|
||||||
|
|
||||||
@ -576,12 +583,6 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sender->IsLooting())
|
|
||||||
{
|
|
||||||
coa->open = 0x00;
|
|
||||||
user = sender;
|
|
||||||
}
|
|
||||||
|
|
||||||
sender->QueuePacket(outapp);
|
sender->QueuePacket(outapp);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
|
|
||||||
@ -590,6 +591,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
|||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
// Starting to use this object
|
// Starting to use this object
|
||||||
|
m_inuse = true;
|
||||||
sender->SetTradeskillObject(this);
|
sender->SetTradeskillObject(this);
|
||||||
|
|
||||||
user = sender;
|
user = sender;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user