make it compile

This commit is contained in:
Aaron Kimbre 2023-11-16 00:32:50 -06:00
parent 2a34cff008
commit 09bd4e9089
6 changed files with 9 additions and 13 deletions

View File

@ -4641,7 +4641,7 @@ void GameMessages::SendDisplayGuildCreateBox(const LWOOBJID& objectID, bool bSho
CBITSTREAM; CBITSTREAM;
CMSGHEADER; CMSGHEADER;
bitStream.Write(GAME_MSG_DISPLAY_GUILD_CREATE_BOX); bitStream.Write(eGameMessageType::DISPLAY_GUILD_CREATE_BOX);
bitStream.Write(objectID); bitStream.Write(objectID);
bitStream.Write((unsigned char)bShow); bitStream.Write((unsigned char)bShow);

View File

@ -4,9 +4,6 @@
#include "dCommonVars.h" #include "dCommonVars.h"
#include <map> #include <map>
#include <string> #include <string>
#include "dMessageIdentifiers.h"
#include "AMFFormat.h"
#include "AMFFormat_BitStream.h"
#include "NiQuaternion.h" #include "NiQuaternion.h"
#include "PropertySelectQueryProperty.h" #include "PropertySelectQueryProperty.h"
#include "TradingManager.h" #include "TradingManager.h"

View File

@ -499,10 +499,10 @@ void ClientPackets::HandleGuildCreation(const SystemAddress& sysAddr, Packet* pa
void ClientPackets::SendGuildCreateResponse(const SystemAddress& sysAddr, eGuildCreationResponse guildResponse, LWOOBJID guildID, std::u16string& guildName) { void ClientPackets::SendGuildCreateResponse(const SystemAddress& sysAddr, eGuildCreationResponse guildResponse, LWOOBJID guildID, std::u16string& guildName) {
CBITSTREAM; CBITSTREAM;
CMSGHEADER; CMSGHEADER;
bitStream.Write(MSG_CLIENT_GUILD_CREATE_RESPONSE); bitStream.Write(eClientMessageType::GUILD_CREATE_RESPONSE);
bitStream.Write(guildResponse); bitStream.Write(guildResponse);
bitStream.Write(guildID); bitStream.Write(guildID);
PacketUtils::WriteWString(bitStream, guildName, 33); bitStream.Write(LUWString(guildName));
SEND_PACKET; SEND_PACKET;
} }

View File

@ -1,14 +1,12 @@
#include "FvGuildCreate.h" #include "FvGuildCreate.h"
#include "GameMessages.h" #include "GameMessages.h"
#include "Amf3.h"
// Server script for Guild Master NPC in FV area. // Server script for Guild Master NPC in FV area.
// This NPC will react to a user interaction and display // This NPC will react to a user interaction and display
// the guild creation screen. // the guild creation screen.
void FvGuildCreate::OnUse(Entity* self, Entity* user) { void FvGuildCreate::OnUse(Entity* self, Entity* user) {
AMFStringValue* value = new AMFStringValue();
value->SetStringValue("ToggleGuildCreate");
AMFArrayValue args; AMFArrayValue args;
GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), value->GetStringValue(), &args); GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), "ToggleGuildCreate", args);
delete value;
} }

View File

@ -1297,7 +1297,7 @@ void HandlePacket(Packet* packet) {
break; break;
} }
case MSG_WORLD_CLIENT_TMP_GUILD_CREATE: { case eWorldMessageType::TMP_GUILD_CREATE: {
Game::logger->Log("WorldServer", "create a guild"); Game::logger->Log("WorldServer", "create a guild");
ClientPackets::HandleGuildCreation(packet->systemAddress, packet); ClientPackets::HandleGuildCreation(packet->systemAddress, packet);
} }

View File

@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS guilds (
name VARCHAR(35) NOT NULL, name VARCHAR(35) NOT NULL,
owner_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE, owner_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE,
motd TEXT, motd TEXT,
uscore INT NOT NULL DEFAULT 0, reputation INT NOT NULL DEFAULT 0,
created BIGINT UNSIGNED NOT NULL DEFAULT 0 created BIGINT UNSIGNED NOT NULL DEFAULT 0
); );
@ -12,4 +12,5 @@ CREATE TABLE IF NOT EXISTS guild_members (
character_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE, character_id BIGINT NOT NULL REFERENCES charinfo(id) ON DELETE CASCADE,
rank INT NOT NULL DEFAULT 4, rank INT NOT NULL DEFAULT 4,
joined BIGINT UNSIGNED NOT NULL DEFAULT 0 joined BIGINT UNSIGNED NOT NULL DEFAULT 0
PRIMARY KEY (guild_id, character_id)
); );