World tradeskill objects should now exhibit pre-RoF behavior to all clients

This commit is contained in:
Uleat 2016-01-12 18:44:51 -05:00
parent acb1d14fbd
commit 21fc487c33
3 changed files with 26 additions and 21 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 01/12/2016 ==
Uleat: Fix for tradeskill containers remaining locked after a RoF+ client leaves. Intermediary fix for RoF+ clients accessing tradeskill containers when in use by another player.
== 12/29/2015 ==
Akkadius: Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true
- When a zone boots, it will spawn an invisible npc by the name of zone_controller

View File

@ -4253,15 +4253,11 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app)
EQApplicationPacket end_trade2(OP_FinishWindow2, 0);
QueuePacket(&end_trade2);
return;
// RoF sends a 0 sized packet for closing objects
/*
Object* object = GetTradeskillObject();
if (object) {
object->CastToObject()->Close();
}
*/
if (GetTradeskillObject() && GetClientVersion() >= ClientVersion::RoF)
GetTradeskillObject()->CastToObject()->Close();
return;
}
else
{

View File

@ -533,20 +533,26 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
ClickObjectAction_Struct* coa = (ClickObjectAction_Struct*)outapp->pBuffer;
//TODO: there is prolly a better way to do this.
//if this is not the main user, send them a close and a message
if(user == nullptr || user == sender)
coa->open = 0x01;
else {
coa->open = 0x00;
//sender->Message(13, "Somebody is allready using that container.");
}
m_inuse = true;
coa->type = m_type;
coa->unknown16 = 0x0a;
m_inuse = true;
coa->type = m_type;
coa->unknown16 = 0x0a;
coa->drop_id = click_object->drop_id;
coa->player_id = click_object->player_id;
coa->icon = m_icon;
coa->drop_id = click_object->drop_id;
coa->player_id = click_object->player_id;
coa->icon = m_icon;
//if this is not the main user, send them a close and a message
if (user == nullptr || user == sender) {
coa->open = 0x01;
}
else {
coa->open = 0x00;
if (sender->GetClientVersion() >= ClientVersion::RoF) {
coa->drop_id = 0xFFFFFFFF;
sender->Message(0, "Someone else is using that. Try again later.");
}
}
if(sender->IsLooting())
{