mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-04-30 17:49:20 +02:00
give bag on player death if 790
This commit is contained in:
parent
5f9d23c127
commit
a27910e47c
@ -276,6 +276,8 @@ enum item_t : uint16_t {
|
|||||||
ITEM_FULLSPLASH = 2886,
|
ITEM_FULLSPLASH = 2886,
|
||||||
ITEM_SMALLSPLASH = 2889,
|
ITEM_SMALLSPLASH = 2889,
|
||||||
|
|
||||||
|
ITEM_BAG = 2853,
|
||||||
|
|
||||||
ITEM_PARCEL = 3503,
|
ITEM_PARCEL = 3503,
|
||||||
ITEM_PARCEL_STAMPED = 3504,
|
ITEM_PARCEL_STAMPED = 3504,
|
||||||
ITEM_LETTER = 3505,
|
ITEM_LETTER = 3505,
|
||||||
|
@ -52,7 +52,7 @@ void MonsterType::createLoot(Container* corpse)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item* bagItem = Item::CreateItem(2853, 1);
|
Item* bagItem = Item::CreateItem(ITEM_BAG, 1);
|
||||||
if (!bagItem) {
|
if (!bagItem) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1599,6 +1599,15 @@ void Player::dropLoot(Container* corpse, Creature*)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_game.getClientVersion() >= CLIENT_VERSION_790) {
|
||||||
|
if (!inventory[CONST_SLOT_BACKPACK]) {
|
||||||
|
Item* bagItem = Item::CreateItem(ITEM_BAG, 1);
|
||||||
|
if (bagItem) {
|
||||||
|
g_game.internalPlayerAddItem(this, bagItem, false, CONST_SLOT_BACKPACK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::death(Creature* lastHitCreature)
|
void Player::death(Creature* lastHitCreature)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user