mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 10:50:24 +00:00
Implement global loot system Fixes #619
This should allow us to emulate lives global tables The options available to filter tables are min_level, max_level, race, rare, raid, race, class, bodytype, and zone. race, class, bodytype, and zone are a pipe | separated list of IDs
This commit is contained in:
+25
-1
@@ -358,9 +358,11 @@ int command_init(void)
|
||||
command_add("showbonusstats", "[item|spell|all] Shows bonus stats for target from items or spells. Shows both by default.", 50, command_showbonusstats) ||
|
||||
command_add("showbuffs", "- List buffs active on your target or you if no target", 50, command_showbuffs) ||
|
||||
command_add("shownumhits", "Shows buffs numhits for yourself.", 0, command_shownumhits) ||
|
||||
command_add("shownpcgloballoot", "Show GlobalLoot entires on this npc", 50, command_shownpcgloballoot) ||
|
||||
command_add("showskills", "- Show the values of your or your player target's skills", 50, command_showskills) ||
|
||||
command_add("showspellslist", "Shows spell list of targeted NPC", 100, command_showspellslist) ||
|
||||
command_add("showstats", "- Show details about you or your target", 50, command_showstats) ||
|
||||
command_add("showzonegloballoot", "Show GlobalLoot entires on this zone", 50, command_showzonegloballoot) ||
|
||||
command_add("shutdown", "- Shut this zone process down", 150, command_shutdown) ||
|
||||
command_add("size", "[size] - Change size of you or your target", 50, command_size) ||
|
||||
command_add("spawn", "[name] [race] [level] [material] [hp] [gender] [class] [priweapon] [secweapon] [merchantid] - Spawn an NPC", 10, command_spawn) ||
|
||||
@@ -2458,7 +2460,9 @@ void command_npctypespawn(Client *c, const Seperator *sep)
|
||||
if (npc && sep->IsNumber(2))
|
||||
npc->SetNPCFactionID(atoi(sep->arg[2]));
|
||||
|
||||
npc->AddLootTable();
|
||||
npc->AddLootTable();
|
||||
if (npc->DropsGlobalLoot())
|
||||
npc->CheckGlobalLootTables();
|
||||
entity_list.AddNPC(npc);
|
||||
}
|
||||
else
|
||||
@@ -3857,6 +3861,12 @@ void command_showstats(Client *c, const Seperator *sep)
|
||||
c->ShowStats(c);
|
||||
}
|
||||
|
||||
void command_showzonegloballoot(Client *c, const Seperator *sep)
|
||||
{
|
||||
c->Message(0, "GlobalLoot for %s (%d:%d)", zone->GetShortName(), zone->GetZoneID(), zone->GetInstanceVersion());
|
||||
zone->ShowZoneGlobalLoot(c);
|
||||
}
|
||||
|
||||
void command_mystats(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() && c->GetPet()) {
|
||||
@@ -10441,6 +10451,20 @@ void command_shownumhits(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
void command_shownpcgloballoot(Client *c, const Seperator *sep)
|
||||
{
|
||||
auto tar = c->GetTarget();
|
||||
|
||||
if (!tar || !tar->IsNPC()) {
|
||||
c->Message(0, "You must target an NPC to use this command.");
|
||||
return;
|
||||
}
|
||||
|
||||
auto npc = tar->CastToNPC();
|
||||
c->Message(0, "GlobalLoot for %s (%d)", npc->GetName(), npc->GetNPCTypeID());
|
||||
zone->ShowNPCGlobalLoot(c, npc);
|
||||
}
|
||||
|
||||
void command_tune(Client *c, const Seperator *sep)
|
||||
{
|
||||
//Work in progress - Kayen
|
||||
|
||||
Reference in New Issue
Block a user