mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-06 09:23:52 +00:00
Merge branch 'master' into lets_move
This commit is contained in:
commit
84dec889da
@ -1,5 +1,18 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 01/13/2016 ==
|
||||||
|
Kinglykrab: Modified #flag so you can refresh your target's account status (GM status level) without them having to relog.
|
||||||
|
- Just target the person whose flag you want to refresh and type #flag.
|
||||||
|
Uleat: Added itemlink functionality to the #summonitem command. Current use is limited to extracting the item id from the link.
|
||||||
|
- Invoking by item link '#summonitem Arrow' produces the same result as by item id '#summonitem 8005'
|
||||||
|
|
||||||
|
== 01/12/2016 ==
|
||||||
|
Athrogate: Adding ClearCompassMark() to Lua.
|
||||||
|
- Lua didn't have ClearCompassMark(). Perl already had this.
|
||||||
|
|
||||||
|
== 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 (thanks Natedog!)
|
||||||
|
|
||||||
== 12/29/2015 ==
|
== 12/29/2015 ==
|
||||||
Akkadius: Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true
|
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
|
- When a zone boots, it will spawn an invisible npc by the name of zone_controller
|
||||||
|
|||||||
@ -2392,13 +2392,14 @@ namespace RoF
|
|||||||
outapp->WriteSInt32(234); // Endurance Total ?
|
outapp->WriteSInt32(234); // Endurance Total ?
|
||||||
outapp->WriteSInt32(345); // Mana Total ?
|
outapp->WriteSInt32(345); // Mana Total ?
|
||||||
|
|
||||||
outapp->WriteUInt32(0); // Unknown
|
// these are needed to fix display bugs
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0x19); // base CR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0x19); // base FR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0x19); // base MR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0xf); // base DR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0xf); // base PR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0xf); // base PhR?
|
||||||
|
outapp->WriteUInt32(0xf); // base Corrup
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0); // Unknown
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0); // Unknown
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0); // Unknown
|
||||||
|
|||||||
@ -2471,13 +2471,14 @@ namespace RoF2
|
|||||||
outapp->WriteSInt32(234); // Endurance Total ?
|
outapp->WriteSInt32(234); // Endurance Total ?
|
||||||
outapp->WriteSInt32(345); // Mana Total ?
|
outapp->WriteSInt32(345); // Mana Total ?
|
||||||
|
|
||||||
outapp->WriteUInt32(0); // Unknown
|
// these are needed to fix display bugs
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0x19); // base CR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0x19); // base FR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0x19); // base MR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0xf); // base DR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0xf); // base PR
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0xf); // base PhR?
|
||||||
|
outapp->WriteUInt32(0xf); // base Corrup
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0); // Unknown
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0); // Unknown
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(0); // Unknown
|
||||||
|
|||||||
@ -1633,13 +1633,19 @@ int32 Client::CalcMR()
|
|||||||
MR = 30;
|
MR = 30;
|
||||||
break;
|
break;
|
||||||
case DRAKKIN:
|
case DRAKKIN:
|
||||||
MR = 35;
|
{
|
||||||
|
MR = 25;
|
||||||
|
if (GetDrakkinHeritage() == 2)
|
||||||
|
MR += 10;
|
||||||
|
else if (GetDrakkinHeritage() == 5)
|
||||||
|
MR += 2;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
MR = 20;
|
MR = 20;
|
||||||
}
|
}
|
||||||
MR += itembonuses.MR + spellbonuses.MR + aabonuses.MR;
|
MR += itembonuses.MR + spellbonuses.MR + aabonuses.MR;
|
||||||
if (GetClass() == WARRIOR) {
|
if (GetClass() == WARRIOR || GetClass() == BERSERKER) {
|
||||||
MR += GetLevel() / 2;
|
MR += GetLevel() / 2;
|
||||||
}
|
}
|
||||||
if (MR < 1) {
|
if (MR < 1) {
|
||||||
@ -1701,8 +1707,14 @@ int32 Client::CalcFR()
|
|||||||
FR = 25;
|
FR = 25;
|
||||||
break;
|
break;
|
||||||
case DRAKKIN:
|
case DRAKKIN:
|
||||||
|
{
|
||||||
FR = 25;
|
FR = 25;
|
||||||
|
if (GetDrakkinHeritage() == 0)
|
||||||
|
FR += 10;
|
||||||
|
else if (GetDrakkinHeritage() == 5)
|
||||||
|
FR += 2;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
FR = 20;
|
FR = 20;
|
||||||
}
|
}
|
||||||
@ -1714,6 +1726,13 @@ int32 Client::CalcFR()
|
|||||||
FR += l - 49;
|
FR += l - 49;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (c == MONK) {
|
||||||
|
FR += 8;
|
||||||
|
int l = GetLevel();
|
||||||
|
if (l > 49) {
|
||||||
|
FR += l - 49;
|
||||||
|
}
|
||||||
|
}
|
||||||
FR += itembonuses.FR + spellbonuses.FR + aabonuses.FR;
|
FR += itembonuses.FR + spellbonuses.FR + aabonuses.FR;
|
||||||
if (FR < 1) {
|
if (FR < 1) {
|
||||||
FR = 1;
|
FR = 1;
|
||||||
@ -1774,12 +1793,24 @@ int32 Client::CalcDR()
|
|||||||
DR = 15;
|
DR = 15;
|
||||||
break;
|
break;
|
||||||
case DRAKKIN:
|
case DRAKKIN:
|
||||||
|
{
|
||||||
DR = 15;
|
DR = 15;
|
||||||
|
if (GetDrakkinHeritage() == 1)
|
||||||
|
DR += 10;
|
||||||
|
else if (GetDrakkinHeritage() == 5)
|
||||||
|
DR += 2;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
DR = 15;
|
DR = 15;
|
||||||
}
|
}
|
||||||
int c = GetClass();
|
int c = GetClass();
|
||||||
|
// the monk one is part of base resist
|
||||||
|
if (c == MONK) {
|
||||||
|
int l = GetLevel();
|
||||||
|
if (l > 50)
|
||||||
|
DR += l - 50;
|
||||||
|
}
|
||||||
if (c == PALADIN) {
|
if (c == PALADIN) {
|
||||||
DR += 8;
|
DR += 8;
|
||||||
int l = GetLevel();
|
int l = GetLevel();
|
||||||
@ -1787,7 +1818,7 @@ int32 Client::CalcDR()
|
|||||||
DR += l - 49;
|
DR += l - 49;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c == SHADOWKNIGHT) {
|
else if (c == SHADOWKNIGHT || c == BEASTLORD) {
|
||||||
DR += 4;
|
DR += 4;
|
||||||
int l = GetLevel();
|
int l = GetLevel();
|
||||||
if (l > 49) {
|
if (l > 49) {
|
||||||
@ -1854,12 +1885,24 @@ int32 Client::CalcPR()
|
|||||||
PR = 30;
|
PR = 30;
|
||||||
break;
|
break;
|
||||||
case DRAKKIN:
|
case DRAKKIN:
|
||||||
|
{
|
||||||
PR = 15;
|
PR = 15;
|
||||||
|
if (GetDrakkinHeritage() == 3)
|
||||||
|
PR += 10;
|
||||||
|
else if (GetDrakkinHeritage() == 5)
|
||||||
|
PR += 2;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
PR = 15;
|
PR = 15;
|
||||||
}
|
}
|
||||||
int c = GetClass();
|
int c = GetClass();
|
||||||
|
// this monk bonus is part of the base
|
||||||
|
if (c == MONK) {
|
||||||
|
int l = GetLevel();
|
||||||
|
if (l > 50)
|
||||||
|
PR += l - 50;
|
||||||
|
}
|
||||||
if (c == ROGUE) {
|
if (c == ROGUE) {
|
||||||
PR += 8;
|
PR += 8;
|
||||||
int l = GetLevel();
|
int l = GetLevel();
|
||||||
@ -1934,13 +1977,19 @@ int32 Client::CalcCR()
|
|||||||
CR = 25;
|
CR = 25;
|
||||||
break;
|
break;
|
||||||
case DRAKKIN:
|
case DRAKKIN:
|
||||||
|
{
|
||||||
CR = 25;
|
CR = 25;
|
||||||
|
if (GetDrakkinHeritage() == 4)
|
||||||
|
CR += 10;
|
||||||
|
else if (GetDrakkinHeritage() == 5)
|
||||||
|
CR += 2;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
CR = 25;
|
CR = 25;
|
||||||
}
|
}
|
||||||
int c = GetClass();
|
int c = GetClass();
|
||||||
if (c == RANGER) {
|
if (c == RANGER || c == BEASTLORD) {
|
||||||
CR += 4;
|
CR += 4;
|
||||||
int l = GetLevel();
|
int l = GetLevel();
|
||||||
if (l > 49) {
|
if (l > 49) {
|
||||||
|
|||||||
@ -4253,15 +4253,11 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app)
|
|||||||
EQApplicationPacket end_trade2(OP_FinishWindow2, 0);
|
EQApplicationPacket end_trade2(OP_FinishWindow2, 0);
|
||||||
QueuePacket(&end_trade2);
|
QueuePacket(&end_trade2);
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
// RoF sends a 0 sized packet for closing objects
|
// RoF sends a 0 sized packet for closing objects
|
||||||
/*
|
if (GetTradeskillObject() && GetClientVersion() >= ClientVersion::RoF)
|
||||||
Object* object = GetTradeskillObject();
|
GetTradeskillObject()->CastToObject()->Close();
|
||||||
if (object) {
|
|
||||||
object->CastToObject()->Close();
|
return;
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4393,8 +4393,14 @@ void command_uptime(Client *c, const Seperator *sep)
|
|||||||
void command_flag(Client *c, const Seperator *sep)
|
void command_flag(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if(sep->arg[2][0] == 0) {
|
if(sep->arg[2][0] == 0) {
|
||||||
c->UpdateAdmin();
|
if (!c->GetTarget() || (c->GetTarget() && c->GetTarget() == c)) {
|
||||||
c->Message(0, "Refreshed your admin flag from DB.");
|
c->UpdateAdmin();
|
||||||
|
c->Message(0, "Refreshed your admin flag from DB.");
|
||||||
|
} else if (c->GetTarget() && c->GetTarget() != c && c->GetTarget()->IsClient()) {
|
||||||
|
c->GetTarget()->CastToClient()->UpdateAdmin();
|
||||||
|
c->Message(0, "%s's admin flag has been refreshed.", c->GetTarget()->GetName());
|
||||||
|
c->GetTarget()->Message(0, "%s refreshed your admin flag.", c->GetName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!sep->IsNumber(1) || atoi(sep->arg[1]) < -2 || atoi(sep->arg[1]) > 255 || strlen(sep->arg[2]) == 0)
|
else if (!sep->IsNumber(1) || atoi(sep->arg[1]) < -2 || atoi(sep->arg[1]) > 255 || strlen(sep->arg[2]) == 0)
|
||||||
c->Message(0, "Usage: #flag [status] [acctname]");
|
c->Message(0, "Usage: #flag [status] [acctname]");
|
||||||
@ -5476,36 +5482,54 @@ void command_interrupt(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
void command_summonitem(Client *c, const Seperator *sep)
|
void command_summonitem(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (!sep->IsNumber(1))
|
uint32 itemid = 0;
|
||||||
c->Message(0, "Usage: #summonitem [item id] [charges], charges are optional");
|
|
||||||
else {
|
|
||||||
uint32 itemid = atoi(sep->arg[1]);
|
|
||||||
int16 item_status = 0;
|
|
||||||
const Item_Struct* item = database.GetItem(itemid);
|
|
||||||
if(item) {
|
|
||||||
item_status = static_cast<int16>(item->MinStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item_status > c->Admin())
|
std::string cmd_msg = sep->msg;
|
||||||
c->Message(13, "Error: Insufficient status to summon this item.");
|
size_t link_open = cmd_msg.find('\x12');
|
||||||
else if (sep->argnum==2 && sep->IsNumber(2))
|
size_t link_close = cmd_msg.find_last_of('\x12');
|
||||||
c->SummonItem(itemid, atoi(sep->arg[2]));
|
if (link_open != link_close && (cmd_msg.length() - link_open) > EmuConstants::TEXT_LINK_BODY_LENGTH) {
|
||||||
else if (sep->argnum==3)
|
TextLinkBody_Struct link_body;
|
||||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
Client::TextLink::DegenerateLinkBody(link_body, cmd_msg.substr(link_open + 1, EmuConstants::TEXT_LINK_BODY_LENGTH));
|
||||||
else if (sep->argnum==4)
|
itemid = link_body.item_id;
|
||||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]));
|
|
||||||
else if (sep->argnum==5)
|
|
||||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]));
|
|
||||||
else if (sep->argnum==6)
|
|
||||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]));
|
|
||||||
else if (sep->argnum==7)
|
|
||||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]));
|
|
||||||
else if (sep->argnum==8)
|
|
||||||
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]), atoi(sep->arg[8]));
|
|
||||||
else {
|
|
||||||
c->SummonItem(itemid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if (!sep->IsNumber(1)) {
|
||||||
|
c->Message(0, "Usage: #summonitem [item id | link] [charges], charges are optional");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
itemid = atoi(sep->arg[1]);
|
||||||
|
}
|
||||||
|
if (!itemid) {
|
||||||
|
c->Message(0, "A valid item id number is required (derived: 0)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int16 item_status = 0;
|
||||||
|
const Item_Struct* item = database.GetItem(itemid);
|
||||||
|
if (item) {
|
||||||
|
item_status = static_cast<int16>(item->MinStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item_status > c->Admin())
|
||||||
|
c->Message(13, "Error: Insufficient status to summon this item.");
|
||||||
|
else if (sep->argnum == 2 && sep->IsNumber(2))
|
||||||
|
c->SummonItem(itemid, atoi(sep->arg[2]));
|
||||||
|
else if (sep->argnum == 3)
|
||||||
|
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
||||||
|
else if (sep->argnum == 4)
|
||||||
|
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]));
|
||||||
|
else if (sep->argnum == 5)
|
||||||
|
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]));
|
||||||
|
else if (sep->argnum == 6)
|
||||||
|
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]));
|
||||||
|
else if (sep->argnum == 7)
|
||||||
|
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]));
|
||||||
|
else if (sep->argnum == 8)
|
||||||
|
c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]), atoi(sep->arg[8]));
|
||||||
|
else {
|
||||||
|
c->SummonItem(itemid);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void command_giveitem(Client *c, const Seperator *sep)
|
void command_giveitem(Client *c, const Seperator *sep)
|
||||||
|
|||||||
@ -1067,6 +1067,11 @@ void Lua_Client::MarkSingleCompassLoc(float in_x, float in_y, float in_z, int co
|
|||||||
self->MarkSingleCompassLoc(in_x, in_y, in_z, count);
|
self->MarkSingleCompassLoc(in_x, in_y, in_z, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Lua_Client::ClearCompassMark() {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->MarkSingleCompassLoc(0,0,0,0);
|
||||||
|
}
|
||||||
|
|
||||||
int Lua_Client::GetNextAvailableSpellBookSlot() {
|
int Lua_Client::GetNextAvailableSpellBookSlot() {
|
||||||
Lua_Safe_Call_Int();
|
Lua_Safe_Call_Int();
|
||||||
return self->GetNextAvailableSpellBookSlot();
|
return self->GetNextAvailableSpellBookSlot();
|
||||||
@ -1548,6 +1553,7 @@ luabind::scope lua_register_client() {
|
|||||||
.def("GrantAlternateAdvancementAbility", (bool(Lua_Client::*)(int, int, bool))&Lua_Client::GrantAlternateAdvancementAbility)
|
.def("GrantAlternateAdvancementAbility", (bool(Lua_Client::*)(int, int, bool))&Lua_Client::GrantAlternateAdvancementAbility)
|
||||||
.def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float))&Lua_Client::MarkSingleCompassLoc)
|
.def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float))&Lua_Client::MarkSingleCompassLoc)
|
||||||
.def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float,int))&Lua_Client::MarkSingleCompassLoc)
|
.def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float,int))&Lua_Client::MarkSingleCompassLoc)
|
||||||
|
.def("ClearCompassMark",(void(Lua_Client::*)(void))&Lua_Client::ClearCompassMark)
|
||||||
.def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(void))&Lua_Client::GetNextAvailableSpellBookSlot)
|
.def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(void))&Lua_Client::GetNextAvailableSpellBookSlot)
|
||||||
.def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(int))&Lua_Client::GetNextAvailableSpellBookSlot)
|
.def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(int))&Lua_Client::GetNextAvailableSpellBookSlot)
|
||||||
.def("FindSpellBookSlotBySpellID", (int(Lua_Client::*)(int))&Lua_Client::FindSpellBookSlotBySpellID)
|
.def("FindSpellBookSlotBySpellID", (int(Lua_Client::*)(int))&Lua_Client::FindSpellBookSlotBySpellID)
|
||||||
|
|||||||
@ -240,6 +240,7 @@ public:
|
|||||||
bool GrantAlternateAdvancementAbility(int aa_id, int points, bool ignore_cost);
|
bool GrantAlternateAdvancementAbility(int aa_id, int points, bool ignore_cost);
|
||||||
void MarkSingleCompassLoc(float in_x, float in_y, float in_z);
|
void MarkSingleCompassLoc(float in_x, float in_y, float in_z);
|
||||||
void MarkSingleCompassLoc(float in_x, float in_y, float in_z, int count);
|
void MarkSingleCompassLoc(float in_x, float in_y, float in_z, int count);
|
||||||
|
void ClearCompassMark();
|
||||||
int GetNextAvailableSpellBookSlot();
|
int GetNextAvailableSpellBookSlot();
|
||||||
int GetNextAvailableSpellBookSlot(int start);
|
int GetNextAvailableSpellBookSlot(int start);
|
||||||
int FindSpellBookSlotBySpellID(int spell_id);
|
int FindSpellBookSlotBySpellID(int spell_id);
|
||||||
|
|||||||
@ -533,20 +533,26 @@ 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.
|
||||||
//if this is not the main user, send them a close and a message
|
m_inuse = true;
|
||||||
if(user == nullptr || user == sender)
|
coa->type = m_type;
|
||||||
coa->open = 0x01;
|
coa->unknown16 = 0x0a;
|
||||||
else {
|
|
||||||
coa->open = 0x00;
|
|
||||||
//sender->Message(13, "Somebody is allready using that container.");
|
|
||||||
}
|
|
||||||
m_inuse = true;
|
|
||||||
coa->type = m_type;
|
|
||||||
coa->unknown16 = 0x0a;
|
|
||||||
|
|
||||||
coa->drop_id = click_object->drop_id;
|
coa->drop_id = click_object->drop_id;
|
||||||
coa->player_id = click_object->player_id;
|
coa->player_id = click_object->player_id;
|
||||||
coa->icon = m_icon;
|
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())
|
if(sender->IsLooting())
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user