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
This commit is contained in:
David Markowitz
2024-12-16 11:35:36 -08:00
committed by GitHub
parent 0f8c5b436d
commit e1c20192f7
6 changed files with 183 additions and 1 deletions

View File

@@ -6338,6 +6338,40 @@ void GameMessages::SendUpdateInventoryUi(LWOOBJID objectId, const SystemAddress&
bitStream.Write(objectId);
bitStream.Write(MessageType::Game::UPDATE_INVENTORY_UI);
SEND_PACKET;
}
void GameMessages::DisplayTooltip::Send() const {
CBITSTREAM;
CMSGHEADER;
bitStream.Write(target);
bitStream.Write(msgId);
bitStream.Write(doOrDie);
bitStream.Write(noRepeat);
bitStream.Write(noRevive);
bitStream.Write(isPropertyTooltip);
bitStream.Write(show);
bitStream.Write(translate);
bitStream.Write(time);
bitStream.Write<int32_t>(id.size());
bitStream.Write(id);
std::string toWrite;
for (const auto* item : localizeParams) {
toWrite += item->GetString() + "\n";
}
if (!toWrite.empty()) toWrite.pop_back();
bitStream.Write<int32_t>(toWrite.size());
bitStream.Write(GeneralUtils::ASCIIToUTF16(toWrite));
if (!toWrite.empty()) bitStream.Write<uint16_t>(0x00); // Null Terminator
bitStream.Write<int32_t>(imageName.size());
bitStream.Write(imageName);
bitStream.Write<int32_t>(text.size());
bitStream.Write(text);
SEND_PACKET;
}