From 0aa539b00d18a09708555606cd08aece8a24f124 Mon Sep 17 00:00:00 2001 From: kremsy Date: Fri, 10 Oct 2014 18:55:49 +0200 Subject: [PATCH] callback fix --- core/Callbacks/LibXmlRpcCallbacks.php | 2 +- core/Callbacks/Structures/ArmorEmptyStructure.php | 1 + core/Callbacks/Structures/NearMissStructure.php | 1 + core/Callbacks/Structures/PlayerHitStructure.php | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/Callbacks/LibXmlRpcCallbacks.php b/core/Callbacks/LibXmlRpcCallbacks.php index 854ad000..472b76b3 100644 --- a/core/Callbacks/LibXmlRpcCallbacks.php +++ b/core/Callbacks/LibXmlRpcCallbacks.php @@ -125,7 +125,7 @@ class LibXmlRpcCallbacks implements CallbackListener { $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ONHIT, new PlayerHitStructure($this->maniaControl, $data)); break; case 'LibXmlRpc_OnNearMiss': - $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ONHIT, new NearMissStructure($this->maniaControl, $data)); + $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ONNEARMISS, new NearMissStructure($this->maniaControl, $data)); break; case 'LibXmlRpc_OnArmorEmpty': $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ONARMOREMPTY, new ArmorEmptyStructure($this->maniaControl, $data)); diff --git a/core/Callbacks/Structures/ArmorEmptyStructure.php b/core/Callbacks/Structures/ArmorEmptyStructure.php index e1cc716b..eb9babab 100644 --- a/core/Callbacks/Structures/ArmorEmptyStructure.php +++ b/core/Callbacks/Structures/ArmorEmptyStructure.php @@ -16,6 +16,7 @@ class ArmorEmptyStructure { private $maniaControl; public function __construct(ManiaControl $maniaControl, $data) { + $this->maniaControl = $maniaControl; $this->shooter = $data[0]; $this->victim = $data[1]; $this->damage = $data[2]; diff --git a/core/Callbacks/Structures/NearMissStructure.php b/core/Callbacks/Structures/NearMissStructure.php index fb77b55c..12b0dac4 100644 --- a/core/Callbacks/Structures/NearMissStructure.php +++ b/core/Callbacks/Structures/NearMissStructure.php @@ -16,6 +16,7 @@ class NearMissStructure { private $maniaControl; public function __construct(ManiaControl $maniaControl, $data) { + $this->maniaControl = $maniaControl; $this->shooter = $data[0]; $this->victim = $data[1]; $this->weapon = $data[2]; diff --git a/core/Callbacks/Structures/PlayerHitStructure.php b/core/Callbacks/Structures/PlayerHitStructure.php index da8ff8dc..8df14a38 100644 --- a/core/Callbacks/Structures/PlayerHitStructure.php +++ b/core/Callbacks/Structures/PlayerHitStructure.php @@ -16,6 +16,7 @@ class PlayerHitStructure { private $maniaControl; public function __construct(ManiaControl $maniaControl, $data) { + $this->maniaControl = $maniaControl; $this->shooter = $data[0]; $this->victim = $data[1]; $this->damage = $data[2];