DarkflameServer/dScripts/ai/WILD/WildNinjaStudent.cpp
EmosewaMC ec00f5fd9d holy mother of const
Use const everywhere that makes sense
return const variables when it makes sense
const functions and variables again, where it makes sense
No raw access and modifications to protected members
Move template definitions to tcc file

idk how I feel about this one
2023-06-09 01:04:42 -07:00

15 lines
617 B
C++

#include "WildNinjaStudent.h"
#include "GameMessages.h"
void WildNinjaStudent::OnStartup(Entity* self) {
self->AddToGroups("Ninjastuff");
GameMessages::SendPlayAnimation(self, u"bow");
}
void WildNinjaStudent::OnNotifyObject(Entity* self, Entity* sender, const std::string& name, int32_t param1, int32_t param2) {
if (name == "Crane") GameMessages::SendPlayAnimation(self, u"crane");
else if (name == "Tiger") GameMessages::SendPlayAnimation(self, u"tiger");
else if (name == "Mantis") GameMessages::SendPlayAnimation(self, u"mantis");
else if (name == "Bow") GameMessages::SendPlayAnimation(self, u"bow");
}