implement player rooking

This commit is contained in:
ErikasKontenis 2019-12-30 18:46:57 +02:00
parent 0da6ba2269
commit 2735c32651
4 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
next: 17571 next: 17572

View File

@ -26,7 +26,7 @@ bindOnlyGlobalAddress = false
loginProtocolPort = 7171 loginProtocolPort = 7171
gameProtocolPort = 7172 gameProtocolPort = 7172
statusProtocolPort = 7171 statusProtocolPort = 7171
maxPlayers = 0 maxPlayers = 1000
motd = "Welcome to Nostalrius 4.5!" motd = "Welcome to Nostalrius 4.5!"
onePlayerOnlinePerAccount = true onePlayerOnlinePerAccount = true
allowClones = false allowClones = false

View File

@ -1,5 +1,7 @@
function onLogin(player) function onLogin(player)
if player:getLastLoginSaved() <= 0 then if player:getStorageValue(17571) ~= 1 then
player:setStorageValue(17571, 1)
-- Items -- Items
if player:getSex() == PLAYERSEX_FEMALE then if player:getSex() == PLAYERSEX_FEMALE then
player:addItem(3562, 1, true, -1, CONST_SLOT_ARMOR) player:addItem(3562, 1, true, -1, CONST_SLOT_ARMOR)

View File

@ -1732,6 +1732,7 @@ void Player::death(Creature* lastHitCreature)
magLevel = 0; magLevel = 0;
magLevelPercent = 0; magLevelPercent = 0;
manaSpent = 0; manaSpent = 0;
staminaMinutes = 3360;
setVocation(0); setVocation(0);
// Restart skills // Restart skills
@ -1749,6 +1750,9 @@ void Player::death(Creature* lastHitCreature)
lastLoginSaved = 0; lastLoginSaved = 0;
lastLogout = 0; lastLogout = 0;
// Restart storages
storageMap.clear();
outfits.clear();
// Restart items // Restart items
for (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; slot++) for (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; slot++)