Fuctions > WZ_Char_SRV_SetStatus ;
-- record last game update
update UsersData set GameDollars=@in_GameDollars, lastgamedate=GETDATE() where CustomerID=@in_CustomerID
-- update basic character data
update UsersChars set
GamePos=@in_GamePos,
GameFlags=@in_GameFlags,
Alive=@in_Alive,
Health=@in_Health,
Food=@in_Hunger,
Water=@in_Thirst,
Toxic=@in_Toxic,
TimePlayed=@in_TimePlayed,
LastUpdateDate=GETDATE(),
XP=@in_XP,
Reputation=@in_Reputation,
Stat00=@in_Stat00,
Stat01=@in_Stat01,
Stat02=@in_Stat02,
Stat03=@in_Stat03,
Stat04=@in_Stat04,
Stat05=@in_Stat05
where CharID=@in_CharID
-- update resources
update UsersData set ResWood=@in_ResWood, ResStone=@in_ResStone, ResMetal=@in_ResMetal where CustomerID=@in_CustomerID
if(@in_Alive = 0) begin
update UsersChars set DeathUtcTime=GETUTCDATE() where CharID=@in_CharID
-- set default backpack on death
update UsersChars set BackpackID=20176, BackpackSize=12 where CharID=@in_CharID
-- delete stuff from backpack
delete from UsersInventory where CustomerID=@in_CustomerID and CharID=@in_CharID
end
Change to ;
-- this function should be called only by server, so we skip all validations
--
/* -- record last game update
update UsersData set GameDollars=@in_GameDollars, lastgamedate=GETDATE() where CustomerID=@in_CustomerID
-- update basic character data
update UsersChars set
GamePos=@in_GamePos,
GameFlags=@in_GameFlags,
Alive=@in_Alive,
Health=@in_Health,
Food=@in_Hunger,
Water=@in_Thirst,
Toxic=@in_Toxic,
TimePlayed=@in_TimePlayed,
LastUpdateDate=GETDATE(),
XP=@in_XP,
Reputation=@in_Reputation,
Stat00=@in_Stat00,
Stat01=@in_Stat01,
Stat02=@in_Stat02,
Stat03=@in_Stat03,
Stat04=@in_Stat04,
Stat05=@in_Stat05
where CharID=@in_CharID
-- update resources
update UsersData set ResWood=@in_ResWood, ResStone=@in_ResStone, ResMetal=@in_ResMetal where CustomerID=@in_CustomerID*/
--if(@in_Alive = 0) begin
-- update UsersChars set DeathUtcTime=GETUTCDATE() where CharID=@in_CharID
-- set default backpack on death
update UsersChars set BackpackID=20176, BackpackSize=12 where CharID=@in_CharID
-- delete stuff from backpack
-- delete from UsersInventory where CustomerID=@in_CustomerID and CharID=@in_CharID
-- end
Search to WarZ_Server.sln ;
Find ;// drop all items
// drop all itemsChange to ;for(int i=0; i < loadout_->BackpackSize; i++)
{
const wiInventoryItem& wi = loadout_->Items[i];
if(wi.itemID > 0)
{
if(isSwimming || (isOverWater && waterDepth > allowedDepth))
BackpackRemoveItem(wi);
else
BackpackDropItem(i);
}
}
/*// drop all itemsfor(int i=0; i < loadout_->BackpackSize; i++)
{
const wiInventoryItem& wi = loadout_->Items[i];
if(wi.itemID > 0)
{
if(isSwimming || (isOverWater && waterDepth > allowedDepth))
BackpackRemoveItem(wi);
else
BackpackDropItem(i);
}
}*/
Search WarZ_Server ;
DROPPED_ITEM_EXPIRE_TIME
Change to ;const float DROPPED_ITEM_EXPIRE_TIME = 15 * 60.0f; // 60 min
const float DROPPED_ITEM_EXPIRE_TIME = 0 * 1.0f; // 60 minNOT TESTİNG!


Reply With Quote![[TUT]NO-Drop for V3 Source](http://ragezone.com/hyper728.png)


