cb fix
This commit is contained in:
parent
498237491f
commit
4e546f6404
@ -43,7 +43,6 @@ class OnHitNearMissArmorEmptyStructure extends BaseStructure {
|
|||||||
$jsonObj = $this->getPlainJsonObject();
|
$jsonObj = $this->getPlainJsonObject();
|
||||||
$this->time = $jsonObj->time;
|
$this->time = $jsonObj->time;
|
||||||
$this->weapon = $jsonObj->weapon;
|
$this->weapon = $jsonObj->weapon;
|
||||||
$this->damage = $jsonObj->damage; //TODO does only exist on onhit -> make baseclass
|
|
||||||
|
|
||||||
$this->shooterPosition = new Position();
|
$this->shooterPosition = new Position();
|
||||||
$this->shooterPosition->setX($jsonObj->shooterposition->x);
|
$this->shooterPosition->setX($jsonObj->shooterposition->x);
|
||||||
@ -59,6 +58,10 @@ class OnHitNearMissArmorEmptyStructure extends BaseStructure {
|
|||||||
$this->distance = $this->getPlainJsonObject()->distance;
|
$this->distance = $this->getPlainJsonObject()->distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (property_exists($this->getPlainJsonObject(), 'damage')) {
|
||||||
|
$this->damage = $this->getPlainJsonObject()->damage;
|
||||||
|
}
|
||||||
|
|
||||||
$this->shooter = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->shooter);
|
$this->shooter = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->shooter);
|
||||||
$this->victim = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->victim);
|
$this->victim = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->victim);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user