#W# Added bandage self command.
This commit is contained in:
parent
ef6da3147e
commit
f0bb877f6a
1 changed files with 0 additions and 33 deletions
|
|
@ -24,39 +24,6 @@ namespace Server.Commands
|
||||||
from.SendMessage( 33, "You are already applying a bandage." );
|
from.SendMessage( 33, "You are already applying a bandage." );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EnchantedBandage enchanted = from.Backpack.FindItemByType<EnchantedBandage>();
|
|
||||||
|
|
||||||
if (enchanted != null && enchanted.Charges > 0)
|
|
||||||
{
|
|
||||||
if ( EnchantedBandage.CooldownTable.ContainsKey( from ) && EnchantedBandage.CooldownTable[from] > DateTime.UtcNow )
|
|
||||||
{
|
|
||||||
from.SendMessage( 33, "You must wait a moment before using an enchanted bandage again." );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Utility.RandomDouble() < 0.30)
|
|
||||||
{
|
|
||||||
from.Poison = null;
|
|
||||||
from.Hits = from.HitsMax;
|
|
||||||
|
|
||||||
from.PlaySound(0x1F2);
|
|
||||||
from.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
|
|
||||||
from.SendMessage(63, "The enchanted bandage glows brightly, instantly curing and fully healing you!");
|
|
||||||
|
|
||||||
EnchantedBandage.CooldownTable[from] = DateTime.UtcNow + TimeSpan.FromSeconds( 5 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (BandageContext.BeginHeal(from, from) != null)
|
|
||||||
{
|
|
||||||
enchanted.Charges--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bandage bandage = from.Backpack.FindItemByType<Bandage>();
|
Bandage bandage = from.Backpack.FindItemByType<Bandage>();
|
||||||
|
|
||||||
if (bandage != null)
|
if (bandage != null)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue