mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-02 10:39:20 +02:00
Rooking player now possible
Reserved storage value 30017 to enable first items when a player is rooked. #17
This commit is contained in:
parent
d1224058dd
commit
10bc933659
@ -1,5 +1,7 @@
|
||||
function onLogin(player)
|
||||
if player:getLastLoginSaved() <= 0 then
|
||||
if player:getLastLoginSaved() <= 0 or player:getStorageValue(30017) == 1 then
|
||||
player:setStorageValue(30017, 0) -- reset storage for first items
|
||||
|
||||
-- Items
|
||||
if player:getSex() == PLAYERSEX_FEMALE then
|
||||
player:addItem(3562, 1, true, -1, CONST_SLOT_ARMOR)
|
||||
|
@ -1732,8 +1732,7 @@ void Player::death(Creature* lastHitCreature)
|
||||
loginPosition = getTemplePosition();
|
||||
|
||||
// Restart first items
|
||||
lastLoginSaved = 0;
|
||||
lastLogout = 0;
|
||||
addStorageValue(30017, 1);
|
||||
|
||||
// Restart items
|
||||
for (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; slot++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user