Fix kill reward for skinned knives
This commit is contained in:
parent
e1aeaa8714
commit
afaed17071
@ -946,6 +946,7 @@ public class GunModule implements Listener
|
||||
}
|
||||
|
||||
event.SetKnockback(false);
|
||||
event.setMetadata("gunType", "KNIFE");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1057,6 +1058,7 @@ public class GunModule implements Listener
|
||||
event.SetIgnoreArmor(true);
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new CustomGunDamageEvent(bullet, event.GetDamageePlayer(), hitArea == 1, event, this));
|
||||
event.setMetadata("gunType", bullet.Gun.getGunStats().name());
|
||||
}
|
||||
|
||||
public int getArrowHitArea(Player damagee, Location origin, Vector trajectory)
|
||||
|
@ -401,19 +401,26 @@ public class Minestrike extends TeamGame
|
||||
if (GetTeam(killed).equals(GetTeam(killer)))
|
||||
return;
|
||||
|
||||
int amount = 300;
|
||||
int amount;
|
||||
|
||||
if (event.GetLog().GetLastDamager().GetReason().contains("AWP"))
|
||||
String gunType = (String) event.GetLog().GetLastDamager().GetDamage().getFirst().getMetadata().get("gunType");
|
||||
switch (gunType)
|
||||
{
|
||||
case "AWP":
|
||||
amount = 100;
|
||||
|
||||
else if (event.GetLog().GetLastDamager().GetReason().contains("PP-Bizon"))
|
||||
break;
|
||||
case "PPBIZON":
|
||||
amount = 600;
|
||||
|
||||
else if (event.GetLog().GetLastDamager().GetReason().contains("Nova"))
|
||||
break;
|
||||
case "NOVA":
|
||||
amount = 900;
|
||||
|
||||
else if (event.GetLog().GetLastDamager().GetReason().contains("Knife"))
|
||||
break;
|
||||
case "KNIFE":
|
||||
amount = 1500;
|
||||
break;
|
||||
default:
|
||||
amount = 300;
|
||||
}
|
||||
|
||||
_shopManager.addMoney(killer, amount, "kill with " + event.GetLog().GetLastDamager().GetReason());
|
||||
|
||||
|
@ -589,6 +589,10 @@ public class Gun extends StrikeItem
|
||||
return _gunStats.getGunType();
|
||||
}
|
||||
|
||||
public GunStats getGunStats()
|
||||
{
|
||||
return _gunStats;
|
||||
}
|
||||
public String getBaseStatName(boolean withPlayerName)
|
||||
{
|
||||
return (withPlayerName ? getOwnerName() + "." : "") + getName() + "." + _activeSkinName;
|
||||
|
Loading…
Reference in New Issue
Block a user