[HELP] Strange bug with dying players

Results 1 to 3 of 3
  1. #1
    Novice Leon Shlufa is offline
    MemberRank
    Jul 2015 Join Date
    4Posts

    sad [HELP] Strange bug with dying players

    So I tried to make a new emulator and I have this Strange problems with people dying. Its like this when a player dies he drops his loot, but his loot stays on him even after his items drop.


  2. #2
    Proficient Member Burak DatLife is offline
    MemberRank
    Jan 2015 Join Date
    inetpub/wwwrootLocation
    173Posts

    Re: [HELP] Strange bug with dying players

    WZ_Char_SRV_SetStatus

    Code:
    ALTER PROCEDURE [dbo].[WZ_Char_SRV_SetStatus]	@in_CustomerID int,
    	@in_CharID int,
    	@in_Alive int,
    	@in_GamePos varchar(256),
    	@in_GameFlags int,
    	@in_Health float,
    	@in_Hunger float,
    	@in_Thirst float,
    	@in_Toxic float,
    	@in_TimePlayed int,
    	@in_XP int,
    	@in_Reputation int,
    	@in_GameDollars int,
    	@in_Stat00 int,
    	@in_Stat01 int,
    	@in_Stat02 int,
    	@in_Stat03 int,
    	@in_Stat04 int,
    	@in_Stat05 int,
    	@in_ResWood int = 0,
    	@in_ResStone int = 0,
    	@in_ResMetal int = 0,
    	@in_CharData varchar(4000) = ''
    AS
    BEGIN
    	SET NOCOUNT ON;
    	
    	--
    	-- this function should be called only by server, so we skip all validations
    	--
    	
    	-- record last game update and update GameDollars with DELTA value
    	update UsersData set GameDollars=(GameDollars+@in_GameDollars), lastgamedate=GETDATE() where CustomerID=@in_CustomerID
    	
    	if(@in_GameDollars > 0) begin
    		insert into DBG_GDLog (RecordTime, CustomerID, CharID, GameDollars) 
    			values (GETDATE(), @in_CustomerID, @in_CharID, @in_GameDollars)
    	end
    
    
    	-- 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 generic character data (if provided)
    	if(@in_CharData <> '')
    		update UsersChars set CharData=@in_CharData 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=20175, BackpackSize=22 where CharID=@in_CharID
    		-- delete stuff from backpack
    		delete from UsersInventory where CustomerID=@in_CustomerID and CharID=@in_CharID
    
    
    		exec DBG_StoreApiCall 'Death', 0, @in_CustomerID, @in_CharID
    	end
    
    
    	select 0 as ResultCode
    END
    Last edited by GigaToni; 10-07-15 at 10:12 PM. Reason: Next time use CODE tags. Not QUOTE.

  3. #3
    Novice Leon Shlufa is offline
    MemberRank
    Jul 2015 Join Date
    4Posts

    Re: [HELP] Strange bug with dying players

    Thanks Its hellped me :D
    Last edited by Leon Shlufa; 10-07-15 at 10:00 PM.



Advertisement