- Joined
- Jan 19, 2014
- Messages
- 137
- Reaction score
- 127
Sorry for the English'm not fluent ...
In warz.sln
Now in warz_server.sln
DB
TheLiciaZ-Developers
In warz.sln
hudMain->setConditionIcon("IconInfection",CurLoadout.legfall);
The top line will be so ...
//hudMain->setConditionIcon("IconBleed",CurLoadout.bleeding);
it has to stay that way
hudMain->setConditionIcon("IconBleed",CurLoadout.bleeding);
Now in warz_server.sln
search for ...
if (damage > 15 && !loadout_->bleeding)
{
loadout_->bleeding = u_GetRandom() >= 0.20f ? false : true;
}
it has to stay that way
if (damage > 15 && !loadout_->bleeding)
{
loadout_->bleeding = u_GetRandom() >= 0.20f ? true : true;
}
now search...
/*if (loadout_->bleeding) // - health {
loadout_->Health -= 0.00050f;
}*/
it has to stay that way
if (loadout_->bleeding) // - health {
loadout_->Health -= 0.00050f; /*hit per 20 seconds recomend 0.00150f; = 1 hit per 20 seconds, 3 hits per minuts*/ // TheLiciaZ
}
There you define how long it will take your blood. Is set for 20 seconds to take a hit
if (damage > 15 && !loadout_->bleeding)
{
loadout_->bleeding = u_GetRandom() >= 0.20f ? true : true;
}
DB
In wz_charRevive
Add the highlighted lines.
ALTER PROCEDURE [dbo].[WZ_CharRevive]
@in_CustomerID int,
@in_CharID int,
@in_Health int
AS
BEGIN
SET NOCOUNT ON;
-- validate CharID/CustomerID pair
declare @CustomerID int = 0
select @CustomerID=CustomerID from UsersChars where CharID=@in_CharID
if(@@ROWCOUNT = 0 or @CustomerID <> @in_CustomerID) begin
select 6 as ResultCode, 'bad charid' as ResultMsg
return
end
-- get developer flag
declare @IsDeveloper int = 0
select @IsDeveloper=IsDeveloper from UsersData where CustomerID=@in_CustomerID
-- note that revive timer is 1hrs, change in WZ_GetAccountInfo1 as well
declare @sectorevive int
declare @alive int = 180
select
@sectorevive=DATEDIFF (second, GETUTCDATE (), DATEADD (second, 600, DeathUtcTime)),
@alive=Alive
from UsersChars where CharID=@in_CharID
-- prevent fast teleporting if we're not dead
if (@alive <> 0) begin
select 6 as ResultCode, 'character is not dead' as ResultMsg
return
end
-- do not allow early revive, give 2min grace
if (@sectorevive < 30) begin
select 0 as ResultCode
update UsersChars set
Alive=2,
Health=@in_Health, -- AomBESkillSystem : Health value from api.
Food=0,
Water=0,
Toxic=0,
GameFlags=1,
bleeding=0
where CharID=@in_CharID
return
end
else
declare @GamePoints int
SELECT @GamePoints=GamePoints FROM UsersData WHERE CustomerID=@in_CustomerID
if (@GamePoints < 0) begin
select 7 as ResultCode, 'Not Enough GP' as ResultMsg
return
end
if (@GamePoints >= 0) begin
update UsersData set GamePoints=(GamePoints-0) WHERE CustomerID=@in_CustomerID
end
select 0 as ResultCode
-- revive
update UsersChars set
Alive=2,
Health=@in_Health, -- AomBESkillSystem : Health value from api.
Food=0,
Water=0,
Toxic=0,
GameFlags=1,
GroupID=0,
bleeding=0
where CharID=@in_CharID
select 0 as ResultCode
END
TheLiciaZ-Developers