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()) { Code:
void SetPlayerKillItemID(int32 pk_item_id) { player_kill_item = pk_item_id; } |
I've never done a PvP server before but is it not just as simple as turning on PvP in the rules table? As you have seen, all the source seems to already incorporate PvP stuff....
https://github.com/EQEmu/Server/blob...letypes.h#L235 |
No it won't necessarily work out of the box. If a client kills another client and the person whom killed the other is grouped (killer is grouped) -- then yea it will work.
Code:
Client::Death similar to what they do here, but its done wrong cause this could be the pet and only works for groups: https://github.com/EQEmu/Server/blob...tack.cpp#L1756 https://github.com/EQEmu/Server/blob...tack.cpp#L1771 Code:
if (killerMob->CastToClient()->isgrouped) { db variables (ServerType, PvPreward, PvPitem) ServerType = 1 (must be enabled to enable the below variables) PvPreward = 3 (ITEM DROP of db variable PvPitem) PvPitem = item id (only in PVPreward 3) *this creates an item, not taken from the corpse PVPreward = 1 one item on corpse PVPreward = -1 all items on corpse |
Ty Image.
at some point, the EqEmu source switched the corpse mechanics out of atack.cpp into corpse.cpp, and disabled the variables. Given that line of code, would it simply work if you excluded the group provision lines? It seems like the first lines of code are signifying the client and not the group. Also, because the database is lacking PvPreward, is it as simple as adding a new table? |
Quote:
The variables may not exist in the DB but you can add them back it would be a new row.. name being the db variable name and the value being whatever it needs to be. |
All times are GMT -4. The time now is 10:03 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.