20 public const NETWORK_ID = ProtocolInfo::NPC_DIALOGUE_PACKET;
22 public const ACTION_OPEN = 0;
23 public const ACTION_CLOSE = 1;
25 private int $npcActorUniqueId;
26 private int $actionType;
27 private string $dialogue;
28 private string $sceneName;
29 private string $npcName;
30 private string $actionJson;
35 public static function create(
int $npcActorUniqueId,
int $actionType,
string $dialogue,
string $sceneName,
string $npcName,
string $actionJson) : self{
37 $result->npcActorUniqueId = $npcActorUniqueId;
38 $result->actionType = $actionType;
39 $result->dialogue = $dialogue;
40 $result->sceneName = $sceneName;
41 $result->npcName = $npcName;
42 $result->actionJson = $actionJson;
46 public function getNpcActorUniqueId() : int{ return $this->npcActorUniqueId; }
48 public function getActionType() : int{ return $this->actionType; }
50 public function getDialogue() : string{ return $this->dialogue; }
52 public function getSceneName() : string{ return $this->sceneName; }
54 public function getNpcName() : string{ return $this->npcName; }
56 public function getActionJson() : string{ return $this->actionJson; }
59 $this->npcActorUniqueId = $in->getLLong();
68 $out->putLLong($this->npcActorUniqueId);
70 $out->putString($this->dialogue);
71 $out->putString($this->sceneName);
72 $out->putString($this->npcName);
73 $out->putString($this->actionJson);
77 return $handler->handleNpcDialogue($this);