DarkflameServer/dScripts/ai/AG/AgSpiderBossMessage.h
David Markowitz e1c20192f7
fix: Implement missing survival tooltip script (#1679)
* brother

* use some better logic

* Implement spider boss msg script

tested that the message now shows up when hitting the survival spider entrance area
2024-12-16 13:35:36 -06:00

38 lines
878 B
C++

#ifndef AGSPIDERBOSSMESSAGE_H
#define AGSPIDERBOSSMESSAGE_H
#include "CppScripts.h"
struct Box {
LWOOBJID boxTarget{};
bool isDisplayed{};
bool isTouch{};
bool isFirst{};
LWOOBJID boxSelf{};
std::u16string boxText{};
int32_t boxTime{ 1 };
void Reset() {
boxTarget = LWOOBJID_EMPTY;
isDisplayed = false;
isTouch = false;
isFirst = false;
boxSelf = LWOOBJID_EMPTY;
boxText.clear();
boxTime = 1;
}
};
class AgSpiderBossMessage : public CppScripts::Script {
public:
Box GetBox(Entity* self) const;
void SetBox(Entity* self, const Box& box) const;
void MakeBox(Entity* self) const;
void OnCollisionPhantom(Entity* self, Entity* target) override;
void OnOffCollisionPhantom(Entity* self, Entity* target) override;
void OnTimerDone(Entity* self, std::string timerName) override;
void ResetBox(Entity* self) const;
};
#endif //!AGSPIDERBOSSMESSAGE_H