mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Add support for kicking epic loot locks
Returning non-0 (no return in a lua/perl function = return 0 so this is best) will prevent the client from looting the item I still need to figure out how to make it so we don't have to kick the player from the corpse, but maybe that's just a difference on live
This commit is contained in:
parent
3cc7d0db63
commit
c1fbfc0f44
@ -1170,7 +1170,15 @@ void Corpse::LootItem(Client* client, const EQApplicationPacket* app) {
|
|||||||
std::vector<EQEmu::Any> args;
|
std::vector<EQEmu::Any> args;
|
||||||
args.push_back(inst);
|
args.push_back(inst);
|
||||||
args.push_back(this);
|
args.push_back(this);
|
||||||
parse->EventPlayer(EVENT_LOOT, client, buf, 0, &args);
|
if (parse->EventPlayer(EVENT_LOOT, client, buf, 0, &args) != 0) {
|
||||||
|
lootitem->auto_loot = 0xFFFFFFFF;
|
||||||
|
client->Message_StringID(CC_Red, LOOT_NOT_ALLOWED, inst->GetItem()->Name);
|
||||||
|
client->QueuePacket(app);
|
||||||
|
SendEndLootErrorPacket(client); // shouldn't need this, but it will work for now
|
||||||
|
being_looted_by = 0;
|
||||||
|
delete inst;
|
||||||
|
return;
|
||||||
|
}
|
||||||
parse->EventItem(EVENT_LOOT, client, inst, this, buf, 0);
|
parse->EventItem(EVENT_LOOT, client, inst, this, buf, 0);
|
||||||
|
|
||||||
if (!IsPlayerCorpse() && RuleB(Character, EnableDiscoveredItems)) {
|
if (!IsPlayerCorpse() && RuleB(Character, EnableDiscoveredItems)) {
|
||||||
|
|||||||
@ -279,6 +279,7 @@
|
|||||||
#define TRADESKILL_MISSING_COMPONENTS 3456 //Sorry, but you don't have everything you need for this recipe in your general inventory.
|
#define TRADESKILL_MISSING_COMPONENTS 3456 //Sorry, but you don't have everything you need for this recipe in your general inventory.
|
||||||
#define TRADESKILL_LEARN_RECIPE 3457 //You have learned the recipe %1!
|
#define TRADESKILL_LEARN_RECIPE 3457 //You have learned the recipe %1!
|
||||||
#define EXPEDITION_MIN_REMAIN 3551 //You only have %1 minutes remaining before this expedition comes to an end.
|
#define EXPEDITION_MIN_REMAIN 3551 //You only have %1 minutes remaining before this expedition comes to an end.
|
||||||
|
#define LOOT_NOT_ALLOWED 3562 //You are not allowed to loot the item: %1.
|
||||||
#define NO_CAST_ON_PET 4045 //You cannot cast this spell on your pet.
|
#define NO_CAST_ON_PET 4045 //You cannot cast this spell on your pet.
|
||||||
#define REWIND_WAIT 4059 //You must wait a bit longer before using the rewind command again.
|
#define REWIND_WAIT 4059 //You must wait a bit longer before using the rewind command again.
|
||||||
#define CORPSEDRAG_LIMIT 4061 //You are already dragging as much as you can!
|
#define CORPSEDRAG_LIMIT 4061 //You are already dragging as much as you can!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user