View Single Post
  #1  
Old 02-14-2018, 10:52 AM
caravellex
Sarnak
 
Join Date: Sep 2010
Posts: 63
Default PvP loot code is there, but variable is missing?

hey, Ive been looking into how to allow PvP item loot for awhile. Most of what I found were discussions of old PvP variables included in older builds. It seems at some point PvPReward and PvPitemloot were removed from the sql database as variables.

In corpse.cpp there appears to be code that supports PvP loot.

Code:
else if (IsPlayerCorpse() && char_id == client->CharacterID()) {
		Loot_Request_Type = 2;
	}
	else if ((IsNPCCorpse() || become_npc) && CanPlayerLoot(client->CharacterID())) {
		Loot_Request_Type = 2;
	}
	else if (GetPlayerKillItem() == -1 && CanPlayerLoot(client->CharacterID())) { /* PVP loot all items, variable cash */
		Loot_Request_Type = 3;
	}
	else if (GetPlayerKillItem() == 1 && CanPlayerLoot(client->CharacterID())) { /* PVP loot 1 item, variable cash */
		Loot_Request_Type = 4;
	}
	else if (GetPlayerKillItem() > 1 && CanPlayerLoot(client->CharacterID())) { /* PVP loot 1 set item, variable cash */
		Loot_Request_Type = 5;
	}
In the corpse.h file it seems to link to pk_item_id
Code:
	void	SetPlayerKillItemID(int32 pk_item_id) { player_kill_item = pk_item_id; }
	int32	GetPlayerKillItem() { return player_kill_item; }
my question is would adding a database variable for pk_item_id allow for pvp loot options? or what would I need to do to enable it.
Reply With Quote