mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-19 00:18:22 +00:00
Merge fixes
This commit is contained in:
@@ -75,6 +75,7 @@ public:
|
||||
uint32 ReadUInt32() { uint32 value = *(uint32 *)(pBuffer + _rpos); _rpos += sizeof(uint32); return value; }
|
||||
uint32 ReadUInt32(uint32 Offset) const { uint32 value = *(uint32 *)(pBuffer + Offset); return value; }
|
||||
void ReadString(char *str) { uint32 len = static_cast<uint32>(strlen((char *)(pBuffer + _rpos))) + 1; memcpy(str, pBuffer + _rpos, len); _rpos += len; }
|
||||
void ReadString(std::string &str) { str = reinterpret_cast<char *>(pBuffer + _rpos); _rpos += str.length() + 1; }
|
||||
void ReadString(char *str, uint32 Offset, uint32 MaxLength) const;
|
||||
|
||||
uint32 GetWritePosition() { return _wpos; }
|
||||
|
||||
@@ -84,6 +84,8 @@ struct VarCache_Struct {
|
||||
class PTimerList;
|
||||
# define _ISNAN_(a) std::isnan(a)
|
||||
|
||||
#define SQL(...) #__VA_ARGS__
|
||||
|
||||
class Database : public DBcore {
|
||||
public:
|
||||
Database();
|
||||
|
||||
@@ -476,7 +476,7 @@ bool Database::CheckDatabaseConversions() {
|
||||
CheckDatabaseConvertCorpseDeblob();
|
||||
|
||||
/* Run EQEmu Server script (Checks for database updates) */
|
||||
system("perl eqemu_server.pl ran_from_world");
|
||||
if(system("perl eqemu_server.pl ran_from_world"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -77,6 +77,10 @@ namespace EQEmu
|
||||
|
||||
} // namespace invtype
|
||||
|
||||
namespace DevTools {
|
||||
const int32 GM_ACCOUNT_STATUS_LEVEL = 150;
|
||||
}
|
||||
|
||||
namespace popupresponse {
|
||||
const int32 SERVER_INTERNAL_USE_BASE = 2000000000;
|
||||
const int32 MOB_INFO_DISMISS = 2000000001;
|
||||
|
||||
+129
-193
@@ -71,7 +71,7 @@
|
||||
//#define AT_Trader 300 // Bazaar Trader Mode (not present in SoF or RoF2)
|
||||
|
||||
// animations for AT_Anim
|
||||
#define ANIM_FREEZE 102
|
||||
#define ANIM_FREEZE 102
|
||||
#define ANIM_STAND 0x64
|
||||
#define ANIM_SIT 0x6e
|
||||
#define ANIM_CROUCH 0x6f
|
||||
@@ -87,199 +87,114 @@ typedef enum {
|
||||
_eaMaxAppearance
|
||||
} EmuAppearance;
|
||||
|
||||
// msg_type's for custom usercolors
|
||||
#define MT_Say 256
|
||||
#define MT_Tell 257
|
||||
#define MT_Group 258
|
||||
#define MT_Guild 259
|
||||
#define MT_OOC 260
|
||||
#define MT_Auction 261
|
||||
#define MT_Shout 262
|
||||
#define MT_Emote 263
|
||||
#define MT_Spells 264
|
||||
#define MT_YouHitOther 265
|
||||
#define MT_OtherHitsYou 266
|
||||
#define MT_YouMissOther 267
|
||||
#define MT_OtherMissesYou 268
|
||||
#define MT_Broadcasts 269
|
||||
#define MT_Skills 270
|
||||
#define MT_Disciplines 271
|
||||
#define MT_Unused1 272
|
||||
#define MT_DefaultText 273
|
||||
#define MT_Unused2 274
|
||||
#define MT_MerchantOffer 275
|
||||
#define MT_MerchantBuySell 276
|
||||
#define MT_YourDeath 277
|
||||
#define MT_OtherDeath 278
|
||||
#define MT_OtherHits 279
|
||||
#define MT_OtherMisses 280
|
||||
#define MT_Who 281
|
||||
#define MT_YellForHelp 282
|
||||
#define MT_NonMelee 283
|
||||
#define MT_WornOff 284
|
||||
#define MT_MoneySplit 285
|
||||
#define MT_LootMessages 286
|
||||
#define MT_DiceRoll 287
|
||||
#define MT_OtherSpells 288
|
||||
#define MT_SpellFailure 289
|
||||
#define MT_Chat 290
|
||||
#define MT_Channel1 291
|
||||
#define MT_Channel2 292
|
||||
#define MT_Channel3 293
|
||||
#define MT_Channel4 294
|
||||
#define MT_Channel5 295
|
||||
#define MT_Channel6 296
|
||||
#define MT_Channel7 297
|
||||
#define MT_Channel8 298
|
||||
#define MT_Channel9 299
|
||||
#define MT_Channel10 300
|
||||
#define MT_CritMelee 301
|
||||
#define MT_SpellCrits 302
|
||||
#define MT_TooFarAway 303
|
||||
#define MT_NPCRampage 304
|
||||
#define MT_NPCFlurry 305
|
||||
#define MT_NPCEnrage 306
|
||||
#define MT_SayEcho 307
|
||||
#define MT_TellEcho 308
|
||||
#define MT_GroupEcho 309
|
||||
#define MT_GuildEcho 310
|
||||
#define MT_OOCEcho 311
|
||||
#define MT_AuctionEcho 312
|
||||
#define MT_ShoutECho 313
|
||||
#define MT_EmoteEcho 314
|
||||
#define MT_Chat1Echo 315
|
||||
#define MT_Chat2Echo 316
|
||||
#define MT_Chat3Echo 317
|
||||
#define MT_Chat4Echo 318
|
||||
#define MT_Chat5Echo 319
|
||||
#define MT_Chat6Echo 320
|
||||
#define MT_Chat7Echo 321
|
||||
#define MT_Chat8Echo 322
|
||||
#define MT_Chat9Echo 323
|
||||
#define MT_Chat10Echo 324
|
||||
#define MT_DoTDamage 325
|
||||
#define MT_ItemLink 326
|
||||
#define MT_RaidSay 327
|
||||
#define MT_MyPet 328
|
||||
#define MT_DS 329
|
||||
#define MT_Leadership 330
|
||||
#define MT_PetFlurry 331
|
||||
#define MT_PetCrit 332
|
||||
#define MT_FocusEffect 333
|
||||
#define MT_Experience 334
|
||||
#define MT_System 335
|
||||
#define MT_PetSpell 336
|
||||
#define MT_PetResponse 337
|
||||
#define MT_ItemSpeech 338
|
||||
#define MT_StrikeThrough 339
|
||||
#define MT_Stun 340
|
||||
namespace Chat {
|
||||
const uint16 White = 0;
|
||||
const uint16 DimGray = 1;
|
||||
const uint16 Default = 1;
|
||||
const uint16 Green = 2;
|
||||
const uint16 BrightBlue = 3;
|
||||
const uint16 LightBlue = 4;
|
||||
const uint16 Magenta = 5;
|
||||
const uint16 Gray = 6;
|
||||
const uint16 LightGray = 7;
|
||||
const uint16 NPCQuestSay = 10;
|
||||
const uint16 DarkGray = 12;
|
||||
const uint16 Red = 13;
|
||||
const uint16 Lime = 14;
|
||||
const uint16 Yellow = 15;
|
||||
const uint16 Blue = 16;
|
||||
const uint16 LightNavy = 17;
|
||||
const uint16 Cyan = 18;
|
||||
const uint16 Black = 20;
|
||||
|
||||
// TODO: Really should combine above and below into one
|
||||
|
||||
//from showeq
|
||||
enum ChatColor
|
||||
{
|
||||
/*
|
||||
CC_Default = 0,
|
||||
CC_DarkGrey = 1,
|
||||
CC_DarkGreen = 2,
|
||||
CC_DarkBlue = 3,
|
||||
CC_Purple = 5,
|
||||
CC_LightGrey = 6,
|
||||
*/
|
||||
|
||||
CC_WhiteSmoke = 0, // FF|F0F0F0
|
||||
CC_Green = 2, // FF|008000
|
||||
CC_BrightBlue = 3, // FF|0040FF
|
||||
CC_Magenta = 5, // FF|F000F0
|
||||
CC_Gray = 6, // FF|808080
|
||||
CC_LightGray = 7, // FF|E0E0E0
|
||||
//CC_WhiteSmoke2 = 10, // FF|F0F0F0
|
||||
CC_DarkGray = 12, // FF|A0A0A0
|
||||
CC_Red = 13, // FF|F00000
|
||||
CC_Lime = 14, // FF|00F000
|
||||
CC_Yellow = 15, // FF|F0F000
|
||||
CC_Blue = 16, // FF|0000F0
|
||||
CC_LightNavy = 17, // FF|0000AF
|
||||
CC_Cyan = 18, // FF|00F0F0
|
||||
CC_Black = 20, // FF|000000
|
||||
|
||||
// any index <= 255 that is not defined above
|
||||
CC_DimGray = 1, // FF|606060
|
||||
CC_Default = 1,
|
||||
|
||||
CC_User_Say = 256,
|
||||
CC_User_Tell = 257,
|
||||
CC_User_Group = 258,
|
||||
CC_User_Guild = 259,
|
||||
CC_User_OOC = 260,
|
||||
CC_User_Auction = 261,
|
||||
CC_User_Shout = 262,
|
||||
CC_User_Emote = 263,
|
||||
CC_User_Spells = 264,
|
||||
CC_User_YouHitOther = 265,
|
||||
CC_User_OtherHitYou = 266,
|
||||
CC_User_YouMissOther = 267,
|
||||
CC_User_OtherMissYou = 268,
|
||||
CC_User_Duels = 269,
|
||||
CC_User_Skills = 270,
|
||||
CC_User_Disciplines = 271,
|
||||
CC_User_Default = 273,
|
||||
CC_User_MerchantOffer = 275,
|
||||
CC_User_MerchantExchange = 276,
|
||||
CC_User_YourDeath = 277,
|
||||
CC_User_OtherDeath = 278,
|
||||
CC_User_OtherHitOther = 279,
|
||||
CC_User_OtherMissOther = 280,
|
||||
CC_User_Who = 281,
|
||||
CC_User_Yell = 282,
|
||||
CC_User_NonMelee = 283,
|
||||
CC_User_SpellWornOff = 284,
|
||||
CC_User_MoneySplit = 285,
|
||||
CC_User_Loot = 286,
|
||||
CC_User_Random = 287,
|
||||
CC_User_OtherSpells = 288,
|
||||
CC_User_SpellFailure = 289,
|
||||
CC_User_ChatChannel = 290,
|
||||
CC_User_Chat1 = 291,
|
||||
CC_User_Chat2 = 292,
|
||||
CC_User_Chat3 = 293,
|
||||
CC_User_Chat4 = 294,
|
||||
CC_User_Chat5 = 295,
|
||||
CC_User_Chat6 = 296,
|
||||
CC_User_Chat7 = 297,
|
||||
CC_User_Chat8 = 298,
|
||||
CC_User_Chat9 = 299,
|
||||
CC_User_Chat10 = 300,
|
||||
CC_User_MeleeCrit = 301,
|
||||
CC_User_SpellCrit = 302,
|
||||
CC_User_TooFarAway = 303,
|
||||
CC_User_NPCRampage = 304,
|
||||
CC_User_NPCFurry = 305,
|
||||
CC_User_NPCEnrage = 306,
|
||||
CC_User_EchoSay = 307,
|
||||
CC_User_EchoTell = 308,
|
||||
CC_User_EchoGroup = 309,
|
||||
CC_User_EchoGuild = 310,
|
||||
CC_User_EchoOOC = 311,
|
||||
CC_User_EchoAuction = 312,
|
||||
CC_User_EchoShout = 313,
|
||||
CC_User_EchoEmote = 314,
|
||||
CC_User_EchoChat1 = 315,
|
||||
CC_User_EchoChat2 = 316,
|
||||
CC_User_EchoChat3 = 317,
|
||||
CC_User_EchoChat4 = 318,
|
||||
CC_User_EchoChat5 = 319,
|
||||
CC_User_EchoChat6 = 320,
|
||||
CC_User_EchoChat7 = 321,
|
||||
CC_User_EchoChat8 = 322,
|
||||
CC_User_EchoChat9 = 323,
|
||||
CC_User_EchoChat10 = 324,
|
||||
CC_User_UnusedAtThisTime = 325,
|
||||
CC_User_ItemTags = 326,
|
||||
CC_User_RaidSay = 327,
|
||||
CC_User_MyPet = 328,
|
||||
CC_User_DamageShield = 329,
|
||||
/**
|
||||
* User colors
|
||||
*/
|
||||
const uint16 Say = 256;
|
||||
const uint16 Tell = 257;
|
||||
const uint16 Group = 258;
|
||||
const uint16 Guild = 259;
|
||||
const uint16 OOC = 260;
|
||||
const uint16 Auction = 261;
|
||||
const uint16 Shout = 262;
|
||||
const uint16 Emote = 263;
|
||||
const uint16 Spells = 264;
|
||||
const uint16 YouHitOther = 265;
|
||||
const uint16 OtherHitYou = 266;
|
||||
const uint16 YouMissOther = 267;
|
||||
const uint16 OtherMissYou = 268;
|
||||
const uint16 Broadcasts = 269;
|
||||
const uint16 Skills = 270;
|
||||
const uint16 Disciplines = 271;
|
||||
const uint16 Unused1 = 272;
|
||||
const uint16 DefaultText = 273;
|
||||
const uint16 Unused2 = 274;
|
||||
const uint16 MerchantOffer = 275;
|
||||
const uint16 MerchantExchange = 276;
|
||||
const uint16 YourDeath = 277;
|
||||
const uint16 OtherDeath = 278;
|
||||
const uint16 OtherHitOther = 279;
|
||||
const uint16 OtherMissOther = 280;
|
||||
const uint16 Who = 281;
|
||||
const uint16 YellForHelp = 282;
|
||||
const uint16 NonMelee = 283;
|
||||
const uint16 SpellWornOff = 284;
|
||||
const uint16 MoneySplit = 285;
|
||||
const uint16 Loot = 286;
|
||||
const uint16 DiceRoll = 287;
|
||||
const uint16 OtherSpells = 288;
|
||||
const uint16 SpellFailure = 289;
|
||||
const uint16 ChatChannel = 290;
|
||||
const uint16 Chat1 = 291;
|
||||
const uint16 Chat2 = 292;
|
||||
const uint16 Chat3 = 293;
|
||||
const uint16 Chat4 = 294;
|
||||
const uint16 Chat5 = 295;
|
||||
const uint16 Chat6 = 296;
|
||||
const uint16 Chat7 = 297;
|
||||
const uint16 Chat8 = 298;
|
||||
const uint16 Chat9 = 299;
|
||||
const uint16 Chat10 = 300;
|
||||
const uint16 MeleeCrit = 301;
|
||||
const uint16 SpellCrit = 302;
|
||||
const uint16 TooFarAway = 303;
|
||||
const uint16 NPCRampage = 304;
|
||||
const uint16 NPCFlurry = 305;
|
||||
const uint16 NPCEnrage = 306;
|
||||
const uint16 EchoSay = 307;
|
||||
const uint16 EchoTell = 308;
|
||||
const uint16 EchoGroup = 309;
|
||||
const uint16 EchoGuild = 310;
|
||||
const uint16 EchoOOC = 311;
|
||||
const uint16 EchoAuction = 312;
|
||||
const uint16 EchoShout = 313;
|
||||
const uint16 EchoEmote = 314;
|
||||
const uint16 EchoChat1 = 315;
|
||||
const uint16 EchoChat2 = 316;
|
||||
const uint16 EchoChat3 = 317;
|
||||
const uint16 EchoChat4 = 318;
|
||||
const uint16 EchoChat5 = 319;
|
||||
const uint16 EchoChat6 = 320;
|
||||
const uint16 EchoChat7 = 321;
|
||||
const uint16 EchoChat8 = 322;
|
||||
const uint16 EchoChat9 = 323;
|
||||
const uint16 EchoChat10 = 324;
|
||||
const uint16 DotDamage = 325;
|
||||
const uint16 ItemLink = 326;
|
||||
const uint16 RaidSay = 327;
|
||||
const uint16 MyPet = 328;
|
||||
const uint16 DamageShield = 329;
|
||||
const uint16 LeaderShip = 330;
|
||||
const uint16 PetFlurry = 331;
|
||||
const uint16 PetCritical = 332;
|
||||
const uint16 FocusEffect = 333;
|
||||
const uint16 Experience = 334;
|
||||
const uint16 System = 335;
|
||||
const uint16 PetSpell = 336;
|
||||
const uint16 PetResponse = 337;
|
||||
const uint16 ItemSpeech = 338;
|
||||
const uint16 StrikeThrough = 339;
|
||||
const uint16 Stun = 340;
|
||||
};
|
||||
|
||||
//ZoneChange_Struct->success values
|
||||
@@ -523,4 +438,25 @@ static const uint8 SkillDamageTypes[EQEmu::skills::HIGHEST_SKILL + 1] = // chang
|
||||
|
||||
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
||||
|
||||
enum ChatChannelNames : uint16
|
||||
{
|
||||
ChatChannel_Guild = 0,
|
||||
ChatChannel_Group = 2,
|
||||
ChatChannel_Shout = 3,
|
||||
ChatChannel_Auction = 4,
|
||||
ChatChannel_OOC = 5,
|
||||
ChatChannel_Broadcast = 6,
|
||||
ChatChannel_Tell = 7,
|
||||
ChatChannel_Say = 8,
|
||||
ChatChannel_Petition = 10,
|
||||
ChatChannel_GMSAY = 11,
|
||||
ChatChannel_TellEcho = 14,
|
||||
ChatChannel_Raid = 15,
|
||||
|
||||
ChatChannel_UNKNOWN_Guild = 17,
|
||||
ChatChannel_UNKNOWN_GMSAY = 18,
|
||||
ChatChannel_UCSRelay = 20,
|
||||
ChatChannel_Emotes = 22
|
||||
};
|
||||
|
||||
#endif /*COMMON_EQ_CONSTANTS_H*/
|
||||
|
||||
@@ -1188,6 +1188,20 @@ struct SpecialMesg_Struct
|
||||
/*24*/ char message[1]; // What is being said?
|
||||
};
|
||||
|
||||
struct SpecialMesgHeader_Struct
|
||||
{
|
||||
/*00*/ char SpeakMode; // 2 shouts, 4 %1 %2, 3 %2, 5 tells group, 0 copy, default says
|
||||
/*01*/ char JournalMode; // 1 and 2 go to journal
|
||||
/*02*/ char language;
|
||||
/*03*/ uint32 msg_type; // Color of text (see MT_*** below)
|
||||
/*07*/ uint32 target_spawn_id; // Who is it being said to?
|
||||
/*11*/ // speaker's name
|
||||
/*xx*/ // unknown, location, client doesn't care
|
||||
/*xx*/ // unknown
|
||||
/*xx*/ // unknown
|
||||
/*xx*/ // message
|
||||
};
|
||||
|
||||
/*
|
||||
** When somebody changes what they're wearing or give a pet a weapon (model changes)
|
||||
** Length: 19 Bytes
|
||||
|
||||
+7
-15
@@ -81,14 +81,6 @@ namespace Console {
|
||||
};
|
||||
}
|
||||
|
||||
enum GameChatColor {
|
||||
yellow = 15,
|
||||
red = 13,
|
||||
light_green = 14,
|
||||
light_cyan = 258,
|
||||
light_purple = 5
|
||||
};
|
||||
|
||||
/**
|
||||
* EQEmuLogSys Constructor
|
||||
*/
|
||||
@@ -306,22 +298,22 @@ uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category)
|
||||
switch (log_category) {
|
||||
case Logs::Status:
|
||||
case Logs::Normal:
|
||||
return GameChatColor::yellow;
|
||||
return Chat::Yellow;
|
||||
case Logs::MySQLError:
|
||||
case Logs::Error:
|
||||
return GameChatColor::red;
|
||||
return Chat::Red;
|
||||
case Logs::MySQLQuery:
|
||||
case Logs::Debug:
|
||||
return GameChatColor::light_green;
|
||||
return Chat::Lime;
|
||||
case Logs::Quests:
|
||||
return GameChatColor::light_cyan;
|
||||
return Chat::Group;
|
||||
case Logs::Commands:
|
||||
case Logs::Mercenaries:
|
||||
return GameChatColor::light_purple;
|
||||
return Chat::Magenta;
|
||||
case Logs::Crash:
|
||||
return GameChatColor::red;
|
||||
return Chat::Red;
|
||||
default:
|
||||
return GameChatColor::yellow;
|
||||
return Chat::Yellow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace EQ
|
||||
resend_delay_min = 150;
|
||||
resend_delay_max = 5000;
|
||||
connect_delay_ms = 500;
|
||||
stale_connection_ms = 90000;
|
||||
stale_connection_ms = 60000;
|
||||
connect_stale_ms = 5000;
|
||||
crc_length = 2;
|
||||
max_packet_size = 512;
|
||||
@@ -269,7 +269,7 @@ namespace EQ
|
||||
simulated_in_packet_loss = 0;
|
||||
simulated_out_packet_loss = 0;
|
||||
tic_rate_hertz = 60.0;
|
||||
resend_timeout = 90000;
|
||||
resend_timeout = 30000;
|
||||
connection_close_time = 2000;
|
||||
outgoing_data_rate = 0.0;
|
||||
}
|
||||
|
||||
+21
-29
@@ -3199,43 +3199,35 @@ namespace RoF
|
||||
EQApplicationPacket *in = *p;
|
||||
*p = nullptr;
|
||||
|
||||
SpecialMesg_Struct *emu = (SpecialMesg_Struct *)in->pBuffer;
|
||||
SerializeBuffer buf(in->size);
|
||||
buf.WriteInt8(in->ReadUInt8()); // speak mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // journal mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // language
|
||||
buf.WriteInt32(in->ReadUInt32()); // message type
|
||||
buf.WriteInt32(in->ReadUInt32()); // target spawn id
|
||||
|
||||
unsigned char *__emu_buffer = in->pBuffer;
|
||||
// break strlen optimizations!
|
||||
char *message = emu->sayer;
|
||||
auto sayer_length = std::char_traits<char>::length(message);
|
||||
message += sayer_length + 1 + 12; // skip over sayer name, null term, and 3 floats
|
||||
std::string name;
|
||||
in->ReadString(name); // NPC names max out at 63 chars
|
||||
|
||||
std::string old_message = message;
|
||||
buf.WriteString(name);
|
||||
|
||||
buf.WriteInt32(in->ReadUInt32()); // loc
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
|
||||
std::string old_message;
|
||||
std::string new_message;
|
||||
|
||||
in->ReadString(old_message);
|
||||
|
||||
ServerToRoFSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = sayer_length + new_message.length() + 25;
|
||||
in->pBuffer = new unsigned char[in->size];
|
||||
buf.WriteString(new_message);
|
||||
|
||||
char *OutBuffer = (char *)in->pBuffer;
|
||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[0]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[1]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[2]);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->msg_type);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->target_spawn_id);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, emu->sayer);
|
||||
|
||||
// TODO: figure this shit out
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, new_message.c_str());
|
||||
|
||||
delete[] __emu_buffer;
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
dest->FastQueuePacket(&outapp, ack_req);
|
||||
delete in;
|
||||
}
|
||||
|
||||
ENCODE(OP_Stun)
|
||||
|
||||
+21
-29
@@ -3266,43 +3266,35 @@ namespace RoF2
|
||||
EQApplicationPacket *in = *p;
|
||||
*p = nullptr;
|
||||
|
||||
SpecialMesg_Struct *emu = (SpecialMesg_Struct *)in->pBuffer;
|
||||
SerializeBuffer buf(in->size);
|
||||
buf.WriteInt8(in->ReadUInt8()); // speak mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // journal mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // language
|
||||
buf.WriteInt32(in->ReadUInt32()); // message type
|
||||
buf.WriteInt32(in->ReadUInt32()); // target spawn id
|
||||
|
||||
unsigned char *__emu_buffer = in->pBuffer;
|
||||
// break strlen optimizations!
|
||||
char *message = emu->sayer;
|
||||
auto sayer_length = std::char_traits<char>::length(message);
|
||||
message += sayer_length + 1 + 12; // skip over sayer name, null term, and 3 floats
|
||||
std::string name;
|
||||
in->ReadString(name); // NPC names max out at 63 chars
|
||||
|
||||
std::string old_message = message;
|
||||
buf.WriteString(name);
|
||||
|
||||
buf.WriteInt32(in->ReadUInt32()); // loc
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
|
||||
std::string old_message;
|
||||
std::string new_message;
|
||||
|
||||
in->ReadString(old_message);
|
||||
|
||||
ServerToRoF2SayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = sayer_length + new_message.length() + 25;
|
||||
in->pBuffer = new unsigned char[in->size];
|
||||
buf.WriteString(new_message);
|
||||
|
||||
char *OutBuffer = (char *)in->pBuffer;
|
||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[0]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[1]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[2]);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->msg_type);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->target_spawn_id);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, emu->sayer);
|
||||
|
||||
// TODO: figure this shit out
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, new_message.c_str());
|
||||
|
||||
delete[] __emu_buffer;
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
dest->FastQueuePacket(&outapp, ack_req);
|
||||
delete in;
|
||||
}
|
||||
|
||||
ENCODE(OP_Stun)
|
||||
|
||||
+21
-29
@@ -2069,43 +2069,35 @@ namespace SoD
|
||||
EQApplicationPacket *in = *p;
|
||||
*p = nullptr;
|
||||
|
||||
SpecialMesg_Struct *emu = (SpecialMesg_Struct *)in->pBuffer;
|
||||
SerializeBuffer buf(in->size);
|
||||
buf.WriteInt8(in->ReadUInt8()); // speak mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // journal mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // language
|
||||
buf.WriteInt32(in->ReadUInt32()); // message type
|
||||
buf.WriteInt32(in->ReadUInt32()); // target spawn id
|
||||
|
||||
unsigned char *__emu_buffer = in->pBuffer;
|
||||
// break strlen optimizations!
|
||||
char *message = emu->sayer;
|
||||
auto sayer_length = std::char_traits<char>::length(message);
|
||||
message += sayer_length + 1 + 12; // skip over sayer name, null term, and 3 floats
|
||||
std::string name;
|
||||
in->ReadString(name); // NPC names max out at 63 chars
|
||||
|
||||
std::string old_message = message;
|
||||
buf.WriteString(name);
|
||||
|
||||
buf.WriteInt32(in->ReadUInt32()); // loc
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
|
||||
std::string old_message;
|
||||
std::string new_message;
|
||||
|
||||
in->ReadString(old_message);
|
||||
|
||||
ServerToSoDSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = sayer_length + new_message.length() + 25;
|
||||
in->pBuffer = new unsigned char[in->size];
|
||||
buf.WriteString(new_message);
|
||||
|
||||
char *OutBuffer = (char *)in->pBuffer;
|
||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[0]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[1]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[2]);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->msg_type);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->target_spawn_id);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, emu->sayer);
|
||||
|
||||
// TODO: figure this shit out
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, new_message.c_str());
|
||||
|
||||
delete[] __emu_buffer;
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
dest->FastQueuePacket(&outapp, ack_req);
|
||||
delete in;
|
||||
}
|
||||
|
||||
ENCODE(OP_Stun)
|
||||
|
||||
+27
-29
@@ -1116,7 +1116,10 @@ namespace SoF
|
||||
}
|
||||
OUT(deity);
|
||||
OUT(intoxication);
|
||||
|
||||
OUT_array(spellSlotRefresh, spells::SPELL_GEM_COUNT);
|
||||
eq->spellSlotRefresh[9] = 0; // 10th slot is not valid in this release
|
||||
|
||||
OUT(abilitySlotRefresh);
|
||||
OUT(points); // Relocation Test
|
||||
// OUT(unknown0166[4]);
|
||||
@@ -1177,7 +1180,10 @@ namespace SoF
|
||||
}
|
||||
|
||||
// OUT(unknown4184[128]);
|
||||
|
||||
OUT_array(mem_spells, spells::SPELL_GEM_COUNT);
|
||||
eq->mem_spells[9] = 0xFFFFFFFFU; // 10th slot is not valid in this release
|
||||
|
||||
// OUT(unknown04396[32]);
|
||||
OUT(platinum);
|
||||
OUT(gold);
|
||||
@@ -1720,43 +1726,35 @@ namespace SoF
|
||||
EQApplicationPacket *in = *p;
|
||||
*p = nullptr;
|
||||
|
||||
SpecialMesg_Struct *emu = (SpecialMesg_Struct *)in->pBuffer;
|
||||
SerializeBuffer buf(in->size);
|
||||
buf.WriteInt8(in->ReadUInt8()); // speak mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // journal mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // language
|
||||
buf.WriteInt32(in->ReadUInt32()); // message type
|
||||
buf.WriteInt32(in->ReadUInt32()); // target spawn id
|
||||
|
||||
unsigned char *__emu_buffer = in->pBuffer;
|
||||
// break strlen optimizations!
|
||||
char *message = emu->sayer;
|
||||
auto sayer_length = std::char_traits<char>::length(message);
|
||||
message += sayer_length + 1 + 12; // skip over sayer name, null term, and 3 floats
|
||||
std::string name;
|
||||
in->ReadString(name);
|
||||
|
||||
std::string old_message = message;
|
||||
buf.WriteString(name);
|
||||
|
||||
buf.WriteInt32(in->ReadUInt32()); // loc
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
|
||||
std::string old_message;
|
||||
std::string new_message;
|
||||
|
||||
in->ReadString(old_message);
|
||||
|
||||
ServerToSoFSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = sayer_length + new_message.length() + 25;
|
||||
in->pBuffer = new unsigned char[in->size];
|
||||
buf.WriteString(new_message);
|
||||
|
||||
char *OutBuffer = (char *)in->pBuffer;
|
||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[0]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[1]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[2]);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->msg_type);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->target_spawn_id);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, emu->sayer);
|
||||
|
||||
// TODO: figure this shit out
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, new_message.c_str());
|
||||
|
||||
delete[] __emu_buffer;
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
dest->FastQueuePacket(&outapp, ack_req);
|
||||
delete in;
|
||||
}
|
||||
|
||||
ENCODE(OP_Stun)
|
||||
|
||||
@@ -328,7 +328,11 @@ namespace SoF
|
||||
|
||||
const int SPELL_ID_MAX = 15999;
|
||||
const int SPELLBOOK_SIZE = 480;
|
||||
// Be careful not to confuse these two..SoF disc release has a special requirement...
|
||||
// - The number of available spell gems HAS NOT increased from 9 at this point
|
||||
// - The profile allocation HAS increased to 10 at this point
|
||||
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
|
||||
const int SPELL_GEM_PROFILE_SIZE = 10; // special case declaration
|
||||
|
||||
const int LONG_BUFFS = 25;
|
||||
const int SHORT_BUFFS = 15;
|
||||
|
||||
@@ -885,7 +885,7 @@ struct PlayerProfile_Struct //23576 Octets
|
||||
/*00060*/ BindStruct binds[5]; // Bind points (primary is first)
|
||||
/*00160*/ uint32 deity; // deity
|
||||
/*00164*/ uint32 intoxication; // Alcohol level (in ticks till sober?)
|
||||
/*00168*/ uint32 spellSlotRefresh[spells::SPELL_GEM_COUNT]; // Refresh time (millis) - 4 Octets Each
|
||||
/*00168*/ uint32 spellSlotRefresh[spells::SPELL_GEM_PROFILE_SIZE]; // Refresh time (millis) - 4 Octets Each
|
||||
/*00208*/ uint32 abilitySlotRefresh;
|
||||
/*00212*/ uint8 haircolor; // Player hair color
|
||||
/*00213*/ uint8 beardcolor; // Player beard color
|
||||
@@ -912,7 +912,7 @@ struct PlayerProfile_Struct //23576 Octets
|
||||
/*04173*/ uint8 unknown02264[147]; // was [139]
|
||||
/*04312*/ uint32 spell_book[spells::SPELLBOOK_SIZE]; // List of the Spells in spellbook 480 = 60 pages
|
||||
/*06232*/ uint8 unknown4184[128]; // was [136]
|
||||
/*06396*/ uint32 mem_spells[spells::SPELL_GEM_COUNT]; // List of spells memorized
|
||||
/*06396*/ uint32 mem_spells[spells::SPELL_GEM_PROFILE_SIZE]; // List of spells memorized
|
||||
/*06436*/ uint8 unknown04396[28]; //#### uint8 unknown04396[32]; in Titanium ####[28]
|
||||
/*06464*/ uint32 platinum; // Platinum Pieces on player
|
||||
/*06468*/ uint32 gold; // Gold Pieces on player
|
||||
@@ -3768,7 +3768,7 @@ struct AnnoyingZoneUnknown_Struct {
|
||||
};
|
||||
|
||||
struct LoadSpellSet_Struct {
|
||||
uint32 spell[spells::SPELL_GEM_COUNT];
|
||||
uint32 spell[spells::SPELL_GEM_PROFILE_SIZE];
|
||||
uint32 unknown;
|
||||
};
|
||||
|
||||
|
||||
+21
-29
@@ -1420,43 +1420,35 @@ namespace Titanium
|
||||
EQApplicationPacket *in = *p;
|
||||
*p = nullptr;
|
||||
|
||||
SpecialMesg_Struct *emu = (SpecialMesg_Struct *)in->pBuffer;
|
||||
SerializeBuffer buf(in->size);
|
||||
buf.WriteInt8(in->ReadUInt8()); // speak mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // journal mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // language
|
||||
buf.WriteInt32(in->ReadUInt32()); // message type
|
||||
buf.WriteInt32(in->ReadUInt32()); // target spawn id
|
||||
|
||||
unsigned char *__emu_buffer = in->pBuffer;
|
||||
// break strlen optimizations!
|
||||
char *message = emu->sayer;
|
||||
auto sayer_length = std::char_traits<char>::length(message);
|
||||
message += sayer_length + 1 + 12; // skip over sayer name, null term, and 3 floats
|
||||
std::string name;
|
||||
in->ReadString(name); // NPC names max out at 63 chars
|
||||
|
||||
std::string old_message = message;
|
||||
buf.WriteString(name);
|
||||
|
||||
buf.WriteInt32(in->ReadUInt32()); // loc
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
|
||||
std::string old_message;
|
||||
std::string new_message;
|
||||
|
||||
in->ReadString(old_message);
|
||||
|
||||
ServerToTitaniumSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = sayer_length + new_message.length() + 25;
|
||||
in->pBuffer = new unsigned char[in->size];
|
||||
buf.WriteString(new_message);
|
||||
|
||||
char *OutBuffer = (char *)in->pBuffer;
|
||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[0]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[1]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[2]);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->msg_type);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->target_spawn_id);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, emu->sayer);
|
||||
|
||||
// TODO: figure this shit out
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, new_message.c_str());
|
||||
|
||||
delete[] __emu_buffer;
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
dest->FastQueuePacket(&outapp, ack_req);
|
||||
delete in;
|
||||
}
|
||||
|
||||
ENCODE(OP_TaskDescription)
|
||||
|
||||
+21
-29
@@ -2369,43 +2369,35 @@ namespace UF
|
||||
EQApplicationPacket *in = *p;
|
||||
*p = nullptr;
|
||||
|
||||
SpecialMesg_Struct *emu = (SpecialMesg_Struct *)in->pBuffer;
|
||||
SerializeBuffer buf(in->size);
|
||||
buf.WriteInt8(in->ReadUInt8()); // speak mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // journal mode
|
||||
buf.WriteInt8(in->ReadUInt8()); // language
|
||||
buf.WriteInt32(in->ReadUInt32()); // message type
|
||||
buf.WriteInt32(in->ReadUInt32()); // target spawn id
|
||||
|
||||
unsigned char *__emu_buffer = in->pBuffer;
|
||||
// break strlen optimizations!
|
||||
char *message = emu->sayer;
|
||||
auto sayer_length = std::char_traits<char>::length(message);
|
||||
message += sayer_length + 1 + 12; // skip over sayer name, null term, and 3 floats
|
||||
std::string name;
|
||||
in->ReadString(name); // NPC names max out at 63 chars
|
||||
|
||||
std::string old_message = message;
|
||||
buf.WriteString(name);
|
||||
|
||||
buf.WriteInt32(in->ReadUInt32()); // loc
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
buf.WriteInt32(in->ReadUInt32());
|
||||
|
||||
std::string old_message;
|
||||
std::string new_message;
|
||||
|
||||
in->ReadString(old_message);
|
||||
|
||||
ServerToUFSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = sayer_length + new_message.length() + 25;
|
||||
in->pBuffer = new unsigned char[in->size];
|
||||
buf.WriteString(new_message);
|
||||
|
||||
char *OutBuffer = (char *)in->pBuffer;
|
||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[0]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[1]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, emu->header[2]);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->msg_type);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->target_spawn_id);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, emu->sayer);
|
||||
|
||||
// TODO: figure this shit out
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0.0f);
|
||||
|
||||
VARSTRUCT_ENCODE_STRING(OutBuffer, new_message.c_str());
|
||||
|
||||
delete[] __emu_buffer;
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
dest->FastQueuePacket(&outapp, ack_req);
|
||||
delete in;
|
||||
}
|
||||
|
||||
ENCODE(OP_Stun)
|
||||
|
||||
+3
-3
@@ -205,6 +205,7 @@ RULE_CATEGORY_END()
|
||||
RULE_CATEGORY(GM)
|
||||
RULE_INT(GM, MinStatusToSummonItem, 250)
|
||||
RULE_INT(GM, MinStatusToZoneAnywhere, 250)
|
||||
RULE_INT(GM, MinStatusToLevelTarget, 100)
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(World)
|
||||
@@ -225,8 +226,6 @@ RULE_BOOL(World, MaxClientsSetByStatus, false) // If True, IP Limiting will be s
|
||||
RULE_BOOL(World, EnableIPExemptions, false) // If True, ip_exemptions table is used, if there is no entry for the IP it will default to RuleI(World, MaxClientsPerIP)
|
||||
RULE_BOOL(World, ClearTempMerchantlist, true) // Clears temp merchant items when world boots.
|
||||
RULE_BOOL(World, DeleteStaleCorpeBackups, true) // Deletes stale corpse backups older than 2 weeks.
|
||||
RULE_INT(World, AccountSessionLimit, -1) //Max number of characters allowed on at once from a single account (-1 is disabled)
|
||||
RULE_INT(World, ExemptAccountLimitStatus, -1) //Min status required to be exempt from multi-session per account limiting (-1 is disabled)
|
||||
RULE_BOOL(World, GMAccountIPList, false) // Check ip list against GM Accounts, AntiHack GM Accounts.
|
||||
RULE_INT(World, MinGMAntiHackStatus, 1) //Minimum GM status to check against AntiHack list
|
||||
RULE_INT(World, SoFStartZoneID, -1) //Sets the Starting Zone for SoF Clients separate from Titanium Clients (-1 is disabled)
|
||||
@@ -241,10 +240,11 @@ RULE_BOOL (World, IPLimitDisconnectAll, false)
|
||||
RULE_BOOL(World, MaxClientsSimplifiedLogic, false) // New logic that only uses ExemptMaxClientsStatus and MaxClientsPerIP. Done on the loginserver. This mimics the P99-style special IP rules.
|
||||
RULE_INT (World, TellQueueSize, 20)
|
||||
RULE_BOOL(World, StartZoneSameAsBindOnCreation, true) //Should the start zone ALWAYS be the same location as your bind?
|
||||
RULE_BOOL(World, EnforceCharacterLimitAtLogin, false)
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Zone)
|
||||
RULE_INT(Zone, ClientLinkdeadMS, 180000) //the time a client remains link dead on the server after a sudden disconnection
|
||||
RULE_INT(Zone, ClientLinkdeadMS, 90000) //the time a client remains link dead on the server after a sudden disconnection
|
||||
RULE_INT(Zone, GraveyardTimeMS, 1200000) //ms time until a player corpse is moved to a zone's graveyard, if one is specified for the zone
|
||||
RULE_BOOL(Zone, EnableShadowrest, 1) // enables or disables the shadowrest zone feature for player corpses. Default is turned on.
|
||||
RULE_BOOL(Zone, UsePlayerCorpseBackups, true) // Keeps backups of player corpses.
|
||||
|
||||
+20
-1
@@ -80,6 +80,7 @@
|
||||
#define ServerOP_GroupJoin 0x003e //for joining ooz folks
|
||||
#define ServerOP_UpdateSpawn 0x003f
|
||||
#define ServerOP_SpawnStatusChange 0x0040
|
||||
#define ServerOP_DropClient 0x0041 // DropClient
|
||||
#define ServerOP_ReloadTasks 0x0060
|
||||
#define ServerOP_DepopAllPlayersCorpses 0x0061
|
||||
#define ServerOP_ReloadTitles 0x0062
|
||||
@@ -213,6 +214,15 @@ enum { QSG_LFGuild_PlayerMatches = 0, QSG_LFGuild_UpdatePlayerInfo, QSG_LFGuild_
|
||||
|
||||
#define ServerOP_Speech 0x4513
|
||||
|
||||
enum {
|
||||
UserToWorldStatusWorldUnavail = 0,
|
||||
UserToWorldStatusSuccess = 1,
|
||||
UserToWorldStatusSuspended = -1,
|
||||
UserToWorldStatusBanned = -2,
|
||||
UserToWorldStatusWorldAtCapacity = -3,
|
||||
UserToWorldStatusAlreadyOnline = -4
|
||||
};
|
||||
|
||||
/************ PACKET RELATED STRUCT ************/
|
||||
class ServerPacket
|
||||
{
|
||||
@@ -308,11 +318,17 @@ struct ServerZoneIncomingClient_Struct {
|
||||
uint32 accid;
|
||||
int16 admin;
|
||||
uint32 charid;
|
||||
uint32 lsid;
|
||||
bool tellsoff;
|
||||
char charname[64];
|
||||
char lskey[30];
|
||||
};
|
||||
|
||||
struct ServerZoneDropClient_Struct
|
||||
{
|
||||
uint32 lsid;
|
||||
};
|
||||
|
||||
struct ServerChangeWID_Struct {
|
||||
uint32 charid;
|
||||
uint32 newwid;
|
||||
@@ -343,7 +359,8 @@ struct ServerChannelMessage_Struct {
|
||||
bool noreply;
|
||||
uint16 chan_num;
|
||||
uint32 guilddbid;
|
||||
uint16 language;
|
||||
uint8 language;
|
||||
uint8 lang_skill;
|
||||
uint8 queued; // 0 = not queued, 1 = queued, 2 = queue full, 3 = offline
|
||||
char message[0];
|
||||
};
|
||||
@@ -856,6 +873,8 @@ struct ServerRaidGroupAction_Struct { //add / remove depends on opcode.
|
||||
struct ServerRaidMessage_Struct {
|
||||
uint32 rid;
|
||||
uint32 gid;
|
||||
uint8 language;
|
||||
uint8 lang_skill;
|
||||
char from[64];
|
||||
char message[0];
|
||||
};
|
||||
|
||||
+22
-1
@@ -27,6 +27,8 @@
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef va_copy
|
||||
@@ -119,10 +121,29 @@ std::vector<std::string> SplitString(const std::string &str, char delim) {
|
||||
while(std::getline(ss, item, delim)) {
|
||||
ret.push_back(item);
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string implode(std::string glue, std::vector<std::string> src)
|
||||
{
|
||||
if (src.empty()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::ostringstream output;
|
||||
std::vector<std::string>::iterator src_iter;
|
||||
|
||||
for (src_iter = src.begin(); src_iter != src.end(); src_iter++) {
|
||||
output << *src_iter << glue;
|
||||
}
|
||||
|
||||
std::string final_output = output.str();
|
||||
final_output.resize (output.str().size () - glue.size());
|
||||
|
||||
return final_output;
|
||||
}
|
||||
|
||||
std::string EscapeString(const std::string &s) {
|
||||
std::string ret;
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ const std::string ucfirst(std::string s);
|
||||
std::vector<std::string> split(std::string str_to_split, char delimiter);
|
||||
const std::string StringFormat(const char* format, ...);
|
||||
const std::string vStringFormat(const char* format, va_list args);
|
||||
std::string implode(std::string glue, std::vector<std::string> src);
|
||||
std::vector<std::string> SplitString(const std::string &s, char delim);
|
||||
std::string EscapeString(const char *src, size_t sz);
|
||||
std::string EscapeString(const std::string &s);
|
||||
|
||||
Reference in New Issue
Block a user