PHP Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[UpdatePlayer]
@Level int,
@Specialty int,
@Contribute int,
@Exp int,
@GRole int,
@Strength int,
@Health int,
@Intelligence int,
@Wisdom int,
@Dexterity int,
@CurHP int,
@CurMP int,
@PUPoint int,
@SUPoint int,
@Killed int,
@Map int,
@X int,
@Y int,
@Z int,
@Rage int,
@PID int
AS
IF(@CurHP > 62000)
BEGIN
UPDATE Player SET [Level] = @Level, [Specialty] = @Specialty, [Contribute] = @Contribute, [Exp] = @Exp, [GRole] = @GRole, [Strength] = @Strength, [Health] = @Health, [Intelligence] = @Intelligence, [Wisdom] = @Wisdom, [Dexterity] = @Dexterity, [CurHP] = 32000, [CurMP] = @CurMP, [PUPoint] = @PUPoint, [SUPoint] = @SUPoint, [Killed] = @Killed, [Map] = @Map, [X] = @X, [Y] = @Y, [Z] = @Z, [Rage] = @Rage WHERE [PID] = @PID
END
ELSE
BEGIN
UPDATE Player SET [Level] = @Level, [Specialty] = @Specialty, [Contribute] = @Contribute, [Exp] = @Exp, [GRole] = @GRole, [Strength] = @Strength, [Health] = @Health, [Intelligence] = @Intelligence, [Wisdom] = @Wisdom, [Dexterity] = @Dexterity, [CurHP] = @CurHP, [CurMP] = @CurMP, [PUPoint] = @PUPoint, [SUPoint] = @SUPoint, [Killed] = @Killed, [Map] = @Map, [X] = @X, [Y] = @Y, [Z] = @Z, [Rage] = @Rage WHERE [PID] = @PID
END
update player alrdy hexed