Skip to content
Snippets Groups Projects
Commit 6fbcae75 authored by GleenMike's avatar GleenMike
Browse files

bugfix : killpet when pet is wizard

parent a581cc43
No related merge requests found
...@@ -93,12 +93,23 @@ namespace Console{ ...@@ -93,12 +93,23 @@ namespace Console{
public static void KillPet(string[] args) public static void KillPet(string[] args)
{ {
if (args.Length == 0) { if (args.Length == 0) {
if (PetHealth.instance != null && !PetHealth.instance.isDead) { if (StateController.petTag != 3)
PetHealth.instance.TakeDamage(PetHealth.instance.currentHealth); {
DeveloperConsole.instance.AddMessageToConsole(":: Pet killed"); if (PetHealth.instance != null && StateController.petTag != 2)
{
PetHealth.instance.TakeDamage(PetHealth.instance.currentHealth);
DeveloperConsole.instance.AddMessageToConsole(":: Pet killed");
}
else if (WizardHealth.instance != null && StateController.petTag == 2)
{
WizardHealth.instance.TakeDamage(WizardHealth.instance.currentHealth);
DeveloperConsole.instance.AddMessageToConsole(":: Pet killed");
}
} }
DeveloperConsole.instance.AddMessageToConsole("!! You don't have a pet"); else
return; {
DeveloperConsole.instance.AddMessageToConsole("!! You don't have a pet");
}
} }
DeveloperConsole.instance.AddMessageToConsole("!! This command doesn't take any arguments"); DeveloperConsole.instance.AddMessageToConsole("!! This command doesn't take any arguments");
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment