mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
WIP, porting old laurion changes to tob
This commit is contained in:
+41
-3
@@ -1205,7 +1205,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
LogDebug("Client::ChannelMessageReceived() Channel:[{}] message:[{}]", chan_num, message);
|
||||
|
||||
if (RuleB(Chat, AlwaysCaptureCommandText)) {
|
||||
if (message[0] == COMMAND_CHAR) {
|
||||
if (message[0] == COMMAND_CHAR || message[0] == COMMAND_CHAR_NON_HASH) {
|
||||
if (command_dispatch(this, message, false) == -2) {
|
||||
if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
|
||||
int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
|
||||
@@ -1538,7 +1538,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
}
|
||||
}
|
||||
|
||||
if (message[0] == COMMAND_CHAR) {
|
||||
if (message[0] == COMMAND_CHAR || message[0] == COMMAND_CHAR_NON_HASH) {
|
||||
if (command_dispatch(this, message, false) == -2) {
|
||||
if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
|
||||
int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
|
||||
@@ -8083,7 +8083,7 @@ void Client::GarbleMessage(char *message, uint8 variance)
|
||||
int delimiter_count = 0;
|
||||
|
||||
// Don't garble # commands
|
||||
if (message[0] == COMMAND_CHAR || message[0] == BOT_COMMAND_CHAR) {
|
||||
if (message[0] == COMMAND_CHAR || message[0] == COMMAND_CHAR_NON_HASH || message[0] == BOT_COMMAND_CHAR) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9158,6 +9158,44 @@ void Client::SendHPUpdateMarquee(){
|
||||
SendMarqueeMessage(Chat::Yellow, 510, 0, 3000, 3000, health_update_notification);
|
||||
}
|
||||
|
||||
void Client::SendMembership() {
|
||||
if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) {
|
||||
auto outapp = new EQApplicationPacket(OP_SendMembership, sizeof(Membership_Struct));
|
||||
Membership_Struct* mc = (Membership_Struct*)outapp->pBuffer;
|
||||
|
||||
mc->membership = 2; //Hardcode to gold for now. We don't use anything else.
|
||||
mc->races = 0x1ffff; // Available Races (4110 for silver)
|
||||
mc->classes = 0x1ffff; // Available Classes (4614 for silver) - Was 0x101ffff
|
||||
mc->entrysize = 21; // Number of membership setting entries below
|
||||
mc->entries[0] = 0xffffffff; // Max AA Restriction
|
||||
mc->entries[1] = 0xffffffff; // Max Level Restriction
|
||||
mc->entries[2] = 0xffffffff; // Max Char Slots per Account (not used by client?)
|
||||
mc->entries[3] = 0xffffffff; // 1 for Silver
|
||||
mc->entries[4] = 0xffffffff; // Main Inventory Size (0xffffffff on Live for Gold, but limiting to 8 until 10 is supported)
|
||||
mc->entries[5] = 0xffffffff; // Max Platinum per level
|
||||
mc->entries[6] = 1; // 0 for Silver
|
||||
mc->entries[7] = 1; // 0 for Silver
|
||||
mc->entries[8] = 1; // 1 for Silver
|
||||
mc->entries[9] = 0xffffffff; // Unknown - Maybe Loyalty Points every 12 hours? 60 per week for Silver
|
||||
mc->entries[10] = 1; // 1 for Silver
|
||||
mc->entries[11] = 0xffffffff; // Shared Bank Slots
|
||||
mc->entries[12] = 0xffffffff; // Unknown - Maybe Max Active Tasks?
|
||||
mc->entries[13] = 1; // 1 for Silver
|
||||
mc->entries[14] = 1; // 0 for Silver
|
||||
mc->entries[15] = 1; // 0 for Silver
|
||||
mc->entries[16] = 1; // 1 for Silver
|
||||
mc->entries[17] = 1; // 0 for Silver
|
||||
mc->entries[18] = 1; // 0 for Silver
|
||||
mc->entries[19] = 0xffffffff; // 0 for Silver
|
||||
mc->entries[20] = 0xffffffff; // 0 for Silver
|
||||
mc->exit_url_length = 0;
|
||||
//mc->exit_url = 0; // Used on Live: "http://www.everquest.com/free-to-play/exit-silver"
|
||||
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
}
|
||||
|
||||
uint32 Client::GetMoney(uint8 type, uint8 subtype) {
|
||||
uint32 value = 0;
|
||||
|
||||
|
||||
@@ -1856,6 +1856,7 @@ public:
|
||||
void ResetHPUpdateTimer() { hpupdate_timer.Start(); }
|
||||
|
||||
void SendHPUpdateMarquee();
|
||||
void SendMembership();
|
||||
|
||||
void CheckRegionTypeChanges();
|
||||
|
||||
|
||||
+26
-27
@@ -105,7 +105,6 @@ void MapOpcodes()
|
||||
ConnectingOpcodes[OP_ZoneEntry] = &Client::Handle_Connect_OP_ZoneEntry;
|
||||
|
||||
// connected opcode handler assignments:
|
||||
ConnectedOpcodes[OP_0x0193] = &Client::Handle_0x0193;
|
||||
ConnectedOpcodes[OP_AAAction] = &Client::Handle_OP_AAAction;
|
||||
ConnectedOpcodes[OP_AcceptNewTask] = &Client::Handle_OP_AcceptNewTask;
|
||||
ConnectedOpcodes[OP_AdventureInfoRequest] = &Client::Handle_OP_AdventureInfoRequest;
|
||||
@@ -1704,10 +1703,8 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
if ((m_pp.RestTimer > RuleI(Character, RestRegenTimeToActivate)) && (m_pp.RestTimer > RuleI(Character, RestRegenRaidTimeToActivate)))
|
||||
m_pp.RestTimer = 0;
|
||||
|
||||
/* This checksum should disappear once dynamic structs are in... each struct strategy will do it */ // looks to be in place now
|
||||
//CRC32::SetEQChecksum((unsigned char*)&m_pp, sizeof(PlayerProfile_Struct) - sizeof(m_pp.m_player_profile_version) - 4);
|
||||
// m_pp.checksum = 0; // All server out-bound player profile packets are now translated - no need to waste cycles calculating this...
|
||||
|
||||
SendMembership();
|
||||
|
||||
outapp = new EQApplicationPacket(OP_PlayerProfile, sizeof(PlayerProfile_Struct));
|
||||
|
||||
/* The entityid field in the Player Profile is used by the Client in relation to Group Leadership AA */
|
||||
@@ -1881,16 +1878,6 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
// connected opcode handlers
|
||||
void Client::Handle_0x0193(const EQApplicationPacket *app)
|
||||
{
|
||||
// Not sure what this opcode does. It started being sent when OP_ClientUpdate was
|
||||
// changed to pump OP_ClientUpdate back out instead of OP_MobUpdate
|
||||
// 2 bytes: 00 00
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void Client::Handle_OP_AAAction(const EQApplicationPacket *app)
|
||||
{
|
||||
LogAA("Received OP_AAAction");
|
||||
@@ -4276,21 +4263,30 @@ void Client::Handle_OP_Camp(const EQApplicationPacket *app)
|
||||
|
||||
if (IsLFP())
|
||||
worldserver.StopLFP(CharacterID());
|
||||
|
||||
if (GetGM())
|
||||
{
|
||||
if (RuleB(Character, EnableHackedFastCampForGM))
|
||||
{
|
||||
camp_timer.Start(100, true);
|
||||
}
|
||||
else {
|
||||
OnDisconnect(true);
|
||||
|
||||
if (ClientVersion() >= EQ::versions::ClientVersion::SteamLatest) {
|
||||
if (!GetGM()) {
|
||||
camp_timer.Start(29000, true);
|
||||
}
|
||||
|
||||
return;
|
||||
auto outapp = new EQApplicationPacket(OP_Camp, 1);
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
else {
|
||||
if (GetGM())
|
||||
{
|
||||
if (RuleB(Character, EnableHackedFastCampForGM))
|
||||
{
|
||||
camp_timer.Start(100, true);
|
||||
}
|
||||
else {
|
||||
OnDisconnect(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
camp_timer.Start(29000, true);
|
||||
camp_timer.Start(29000, true);
|
||||
}
|
||||
|
||||
if (RuleB(Bots, Enabled)) {
|
||||
bot_camp_timer.Start((RuleI(Bots, CampTimer) * 1000), true);
|
||||
@@ -14568,7 +14564,10 @@ void Client::Handle_OP_ShopRequest(const EQApplicationPacket *app)
|
||||
mco->rate = 1 / buy_cost_mod;
|
||||
}
|
||||
|
||||
outapp->priority = 6;
|
||||
if (m_ClientVersion >= EQ::versions::ClientVersion::SteamLatest) {
|
||||
mco->player_id = GetID();
|
||||
}
|
||||
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
void Handle_Connect_OP_ZoneComplete(const EQApplicationPacket *app);
|
||||
void Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app);
|
||||
/* Connected opcode handlers*/
|
||||
void Handle_0x0193(const EQApplicationPacket *app);
|
||||
void Handle_0x01e7(const EQApplicationPacket *app);
|
||||
void Handle_OP_AAAction(const EQApplicationPacket *app);
|
||||
void Handle_OP_AcceptNewTask(const EQApplicationPacket *app);
|
||||
void Handle_OP_AdventureInfoRequest(const EQApplicationPacket *app);
|
||||
|
||||
@@ -25,6 +25,7 @@ class Client;
|
||||
class Seperator;
|
||||
|
||||
#define COMMAND_CHAR '#'
|
||||
#define COMMAND_CHAR_NON_HASH '$'
|
||||
|
||||
typedef void (*CmdFuncPtr)(Client *, const Seperator *);
|
||||
|
||||
|
||||
@@ -693,8 +693,6 @@ luabind::scope lua_register_packet_opcodes() {
|
||||
luabind::value("ShopEndConfirm", static_cast<int>(OP_ShopEndConfirm)),
|
||||
luabind::value("AdventureMerchantRequest", static_cast<int>(OP_AdventureMerchantRequest)),
|
||||
luabind::value("Sound", static_cast<int>(OP_Sound)),
|
||||
luabind::value("0x0193", static_cast<int>(OP_0x0193)),
|
||||
luabind::value("0x0347", static_cast<int>(OP_0x0347)),
|
||||
luabind::value("WorldComplete", static_cast<int>(OP_WorldComplete)),
|
||||
luabind::value("MobRename", static_cast<int>(OP_MobRename)),
|
||||
luabind::value("TaskDescription", static_cast<int>(OP_TaskDescription)),
|
||||
|
||||
@@ -1284,6 +1284,14 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
strcpy(ns->spawn.name, name);
|
||||
if(IsClient()) {
|
||||
strn0cpy(ns->spawn.lastName, lastname, sizeof(ns->spawn.lastName));
|
||||
ns->spawn.CharacterGuid.Id = CastToClient()->CharacterID();
|
||||
ns->spawn.CharacterGuid.WorldId = RuleI(World, Id);
|
||||
ns->spawn.CharacterGuid.Reserved = 0;
|
||||
}
|
||||
else {
|
||||
ns->spawn.CharacterGuid.Id = 0;
|
||||
ns->spawn.CharacterGuid.WorldId = 0;
|
||||
ns->spawn.CharacterGuid.Reserved = 0;
|
||||
}
|
||||
|
||||
ns->spawn.heading = FloatToEQ12(m_Position.w);
|
||||
|
||||
Reference in New Issue
Block a user