mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 00:06:36 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server into inv_possessions_rework
This commit is contained in:
@@ -376,7 +376,11 @@ struct NewZone_Struct {
|
||||
/*0692*/ uint8 unknown692[8];
|
||||
/*0700*/ float fog_density;
|
||||
/*0704*/ uint32 SuspendBuffs;
|
||||
/*0704*/
|
||||
/*0708*/ uint32 FastRegenHP;
|
||||
/*0712*/ uint32 FastRegenMana;
|
||||
/*0716*/ uint32 FastRegenEndurance;
|
||||
/*0720*/ uint32 NPCAggroMaxDist;
|
||||
/*0724*/
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -90,6 +90,7 @@ enum LogCategory {
|
||||
FixZ,
|
||||
Food,
|
||||
Traps,
|
||||
NPCRoamBox,
|
||||
MaxCategoryID /* Don't Remove this*/
|
||||
};
|
||||
|
||||
@@ -144,7 +145,8 @@ static const char* LogCategoryName[LogCategory::MaxCategoryID] = {
|
||||
"HP Update",
|
||||
"FixZ",
|
||||
"Food",
|
||||
"Traps"
|
||||
"Traps",
|
||||
"NPC Roam Box"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace EQEmu
|
||||
|
||||
class OutBuffer : public std::stringstream {
|
||||
public:
|
||||
inline size_t size() { return tellp(); }
|
||||
inline size_t size() { return static_cast<size_t>(tellp()); }
|
||||
void overwrite(OutBuffer::pos_type position, const char *_Str, std::streamsize _Count);
|
||||
uchar* detach();
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ uint32 SwapBits21And22(uint32 mask);
|
||||
uint32 Catch22(uint32 mask);
|
||||
|
||||
// macro to catch fp errors (provided by noudness)
|
||||
#define FCMP(a,b) (fabs(a-b) < FLT_EPSILON)
|
||||
#define FCMP(a,b) (std::abs(a-b) < FLT_EPSILON)
|
||||
|
||||
#define _ITOA_BUFLEN 25
|
||||
const char *itoa(int num); //not thread safe
|
||||
|
||||
+12
-12
@@ -1823,6 +1823,9 @@ namespace RoF
|
||||
OUT(zone_id);
|
||||
OUT(zone_instance);
|
||||
OUT(SuspendBuffs);
|
||||
OUT(FastRegenHP);
|
||||
OUT(FastRegenMana);
|
||||
OUT(FastRegenEndurance);
|
||||
|
||||
eq->FogDensity = emu->fog_density;
|
||||
|
||||
@@ -1839,9 +1842,6 @@ namespace RoF
|
||||
eq->unknown893 = 0;
|
||||
eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
eq->unknown895 = 0;
|
||||
eq->unknown896 = 180;
|
||||
eq->unknown900 = 180;
|
||||
eq->unknown904 = 180;
|
||||
eq->unknown908 = 2;
|
||||
eq->unknown912 = 2;
|
||||
eq->unknown932 = -1; // Set from PoK Example
|
||||
@@ -2807,7 +2807,7 @@ namespace RoF
|
||||
|
||||
std::vector<int32> skill;
|
||||
std::vector<int32> points;
|
||||
for(auto i = 0; i < emu->total_prereqs; ++i) {
|
||||
for(auto i = 0u; i < emu->total_prereqs; ++i) {
|
||||
skill.push_back(inapp->ReadUInt32());
|
||||
points.push_back(inapp->ReadUInt32());
|
||||
}
|
||||
@@ -2861,7 +2861,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(emu->total_effects);
|
||||
|
||||
inapp->SetReadPosition(sizeof(AARankInfo_Struct));
|
||||
for(auto i = 0; i < emu->total_effects; ++i) {
|
||||
for(auto i = 0u; i < emu->total_effects; ++i) {
|
||||
outapp->WriteUInt32(inapp->ReadUInt32()); // skill_id
|
||||
outapp->WriteUInt32(inapp->ReadUInt32()); // base1
|
||||
outapp->WriteUInt32(inapp->ReadUInt32()); // base2
|
||||
@@ -2917,7 +2917,7 @@ namespace RoF
|
||||
unsigned char *eq_ptr = __packet->pBuffer;
|
||||
eq_ptr += sizeof(structs::CharacterSelect_Struct);
|
||||
|
||||
for (int counter = 0; counter < character_count; ++counter) {
|
||||
for (auto counter = 0u; counter < character_count; ++counter) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
eq_cse = (structs::CharacterSelectEntry_Struct *)eq_ptr; // base address
|
||||
|
||||
@@ -3259,7 +3259,7 @@ namespace RoF
|
||||
InBuffer += title_size;
|
||||
|
||||
TaskDescriptionData1_Struct *emu_tdd1 = (TaskDescriptionData1_Struct *)InBuffer;
|
||||
emu_tdd1->StartTime = (time(nullptr) - emu_tdd1->StartTime); // RoF has elapsed time here rather than start time
|
||||
emu_tdd1->StartTime = (static_cast<uint32>(time(nullptr)) - emu_tdd1->StartTime); // RoF has elapsed time here rather than start time
|
||||
|
||||
InBuffer += sizeof(TaskDescriptionData1_Struct);
|
||||
uint32 description_size = strlen(InBuffer) + 1;
|
||||
@@ -3610,10 +3610,10 @@ namespace RoF
|
||||
|
||||
// calculate size of names, note the packet DOES NOT have null termed c-strings
|
||||
std::vector<uint32> name_lengths;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
for (auto i = 0u; i < count; ++i) {
|
||||
InternalVeteranReward *ivr = (InternalVeteranReward *)__emu_buffer;
|
||||
|
||||
for (int i = 0; i < ivr->claim_count; i++) {
|
||||
for (auto i = 0u; i < ivr->claim_count; i++) {
|
||||
uint32 length = strnlen(ivr->items[i].item_name, 63);
|
||||
if (length)
|
||||
name_lengths.push_back(length);
|
||||
@@ -3633,7 +3633,7 @@ namespace RoF
|
||||
|
||||
outapp->WriteUInt32(count);
|
||||
auto name_itr = name_lengths.begin();
|
||||
for (int i = 0; i < count; i++) {
|
||||
for (auto i = 0u; i < count; i++) {
|
||||
InternalVeteranReward *ivr = (InternalVeteranReward *)__emu_buffer;
|
||||
|
||||
outapp->WriteUInt32(ivr->claim_id);
|
||||
@@ -3641,7 +3641,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(ivr->claim_count);
|
||||
outapp->WriteUInt8(1); // enabled
|
||||
|
||||
for (int j = 0; j < ivr->claim_count; j++) {
|
||||
for (auto j = 0u; j < ivr->claim_count; j++) {
|
||||
assert(name_itr != name_lengths.end()); // the way it's written, it should never happen, so just assert
|
||||
outapp->WriteUInt32(*name_itr);
|
||||
outapp->WriteData(ivr->items[j].item_name, *name_itr);
|
||||
@@ -3869,7 +3869,7 @@ namespace RoF
|
||||
VARSTRUCT_ENCODE_STRING(Buffer, emu->name);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->spawnId);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->level);
|
||||
VARSTRUCT_ENCODE_TYPE(float, Buffer, SpawnSize - 0.7); // Eye Height?
|
||||
VARSTRUCT_ENCODE_TYPE(float, Buffer, SpawnSize - 0.7f); // Eye Height?
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->NPC);
|
||||
|
||||
structs::Spawn_Struct_Bitfields *Bitfields = (structs::Spawn_Struct_Bitfields*)Buffer;
|
||||
|
||||
@@ -1891,6 +1891,9 @@ namespace RoF2
|
||||
OUT(zone_id);
|
||||
OUT(zone_instance);
|
||||
OUT(SuspendBuffs);
|
||||
OUT(FastRegenHP);
|
||||
OUT(FastRegenMana);
|
||||
OUT(FastRegenEndurance);
|
||||
|
||||
eq->FogDensity = emu->fog_density;
|
||||
|
||||
@@ -1914,9 +1917,6 @@ namespace RoF2
|
||||
eq->bNoFear = 0;
|
||||
eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
eq->unknown895 = 0;
|
||||
eq->FastRegenHP = 180;
|
||||
eq->FastRegenMana = 180;
|
||||
eq->FastRegenEndurance = 180;
|
||||
eq->CanPlaceCampsite = 2;
|
||||
eq->CanPlaceGuildBanner = 2;
|
||||
eq->FishingRelated = -1; // Set from PoK Example
|
||||
|
||||
@@ -588,9 +588,9 @@ struct NewZone_Struct {
|
||||
/*0893*/ uint8 unknown893; // Seen 0 - 00
|
||||
/*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
/*0895*/ uint8 unknown895; // Seen 0 - 00
|
||||
/*0896*/ uint32 unknown896; // Seen 180
|
||||
/*0900*/ uint32 unknown900; // Seen 180
|
||||
/*0904*/ uint32 unknown904; // Seen 180
|
||||
/*0896*/ uint32 FastRegenHP; // Seen 180
|
||||
/*0900*/ uint32 FastRegenMana; // Seen 180
|
||||
/*0904*/ uint32 FastRegenEndurance; // Seen 180
|
||||
/*0908*/ uint32 unknown908; // Seen 2
|
||||
/*0912*/ uint32 unknown912; // Seen 2
|
||||
/*0916*/ float FogDensity; // Most zones have this set to 0.33 Blightfire had 0.16
|
||||
|
||||
@@ -1350,6 +1350,10 @@ namespace SoD
|
||||
OUT(zone_id);
|
||||
OUT(zone_instance);
|
||||
OUT(SuspendBuffs);
|
||||
OUT(FastRegenHP);
|
||||
OUT(FastRegenMana);
|
||||
OUT(FastRegenEndurance);
|
||||
|
||||
/*fill in some unknowns with observed values, hopefully it will help */
|
||||
eq->unknown800 = -1;
|
||||
eq->unknown844 = 600;
|
||||
@@ -1363,9 +1367,6 @@ namespace SoD
|
||||
eq->unknown893 = 0;
|
||||
eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
eq->unknown895 = 0;
|
||||
eq->unknown896 = 180;
|
||||
eq->unknown900 = 180;
|
||||
eq->unknown904 = 180;
|
||||
eq->unknown908 = 2;
|
||||
eq->unknown912 = 2;
|
||||
eq->FogDensity = emu->fog_density;
|
||||
|
||||
@@ -456,9 +456,9 @@ struct NewZone_Struct {
|
||||
/*0893*/ uint8 unknown893; //seen 0 - 00
|
||||
/*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
/*0895*/ uint8 unknown895; //seen 0 - 00
|
||||
/*0896*/ uint32 unknown896; //seen 180
|
||||
/*0900*/ uint32 unknown900; //seen 180
|
||||
/*0904*/ uint32 unknown904; //seen 180
|
||||
/*0896*/ uint32 FastRegenHP; //seen 180
|
||||
/*0900*/ uint32 FastRegenMana; //seen 180
|
||||
/*0904*/ uint32 FastRegenEndurance; //seen 180
|
||||
/*0908*/ uint32 unknown908; //seen 2
|
||||
/*0912*/ uint32 unknown912; //seen 2
|
||||
/*0916*/ float FogDensity; //Of about 10 or so zones tested, all but one have this set to 0.33 Blightfire had 0.16
|
||||
|
||||
@@ -1027,6 +1027,9 @@ namespace SoF
|
||||
OUT(zone_id);
|
||||
OUT(zone_instance);
|
||||
OUT(SuspendBuffs);
|
||||
OUT(FastRegenHP);
|
||||
OUT(FastRegenMana);
|
||||
OUT(FastRegenEndurance);
|
||||
|
||||
/*fill in some unknowns with observed values, hopefully it will help */
|
||||
eq->unknown796 = -1;
|
||||
@@ -1041,9 +1044,6 @@ namespace SoF
|
||||
eq->unknown889 = 0;
|
||||
eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
eq->unknown891 = 0;
|
||||
eq->unknown892 = 180;
|
||||
eq->unknown896 = 180;
|
||||
eq->unknown900 = 180;
|
||||
eq->unknown904 = 2;
|
||||
eq->unknown908 = 2;
|
||||
|
||||
|
||||
@@ -460,9 +460,9 @@ struct NewZone_Struct {
|
||||
/*0893*/ uint8 unknown889; //seen 0 - 00
|
||||
/*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
/*0895*/ uint8 unknown891; //seen 0 - 00
|
||||
/*0892*/ uint32 unknown892; //seen 180
|
||||
/*0896*/ uint32 unknown896; //seen 180
|
||||
/*0900*/ uint32 unknown900; //seen 180
|
||||
/*0892*/ uint32 FastRegenHP; //seen 180
|
||||
/*0896*/ uint32 FastRegenMana; //seen 180
|
||||
/*0900*/ uint32 FastRegenEndurance; //seen 180
|
||||
/*0904*/ uint32 unknown904; //seen 2
|
||||
/*0908*/ uint32 unknown908; //seen 2
|
||||
/*0912*/
|
||||
|
||||
@@ -1574,6 +1574,9 @@ namespace UF
|
||||
OUT(zone_id);
|
||||
OUT(zone_instance);
|
||||
OUT(SuspendBuffs);
|
||||
OUT(FastRegenHP);
|
||||
OUT(FastRegenMana);
|
||||
OUT(FastRegenEndurance);
|
||||
|
||||
eq->FogDensity = emu->fog_density;
|
||||
|
||||
@@ -1590,9 +1593,6 @@ namespace UF
|
||||
eq->unknown893 = 0;
|
||||
eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
eq->unknown895 = 0;
|
||||
eq->unknown896 = 180;
|
||||
eq->unknown900 = 180;
|
||||
eq->unknown904 = 180;
|
||||
eq->unknown908 = 2;
|
||||
eq->unknown912 = 2;
|
||||
|
||||
|
||||
@@ -456,9 +456,9 @@ struct NewZone_Struct {
|
||||
/*0893*/ uint8 unknown893; //seen 0 - 00
|
||||
/*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
/*0895*/ uint8 unknown895; //seen 0 - 00
|
||||
/*0896*/ uint32 unknown896; //seen 180
|
||||
/*0900*/ uint32 unknown900; //seen 180
|
||||
/*0904*/ uint32 unknown904; //seen 180
|
||||
/*0896*/ uint32 FastRegenHP; //seen 180
|
||||
/*0900*/ uint32 FastRegenMana; //seen 180
|
||||
/*0904*/ uint32 FastRegenEndurance; //seen 180
|
||||
/*0908*/ uint32 unknown908; //seen 2
|
||||
/*0912*/ uint32 unknown912; //seen 2
|
||||
/*0916*/ float FogDensity; //Of about 10 or so zones tested, all but one have this set to 0.33 Blightfire had 0.16
|
||||
|
||||
+8
-3
@@ -94,9 +94,6 @@ RULE_INT(Character, SkillUpModifier, 100) //skill ups are at 100%
|
||||
RULE_BOOL(Character, SharedBankPlat, false) //off by default to prevent duping for now
|
||||
RULE_BOOL(Character, BindAnywhere, false)
|
||||
RULE_BOOL(Character, RestRegenEnabled, true) // Enable OOC Regen
|
||||
RULE_INT(Character, RestRegenHP, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180
|
||||
RULE_INT(Character, RestRegenMana, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180
|
||||
RULE_INT(Character, RestRegenEnd, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180
|
||||
RULE_INT(Character, RestRegenTimeToActivate, 30) // Time in seconds for rest state regen to kick in.
|
||||
RULE_INT(Character, RestRegenRaidTimeToActivate, 300) // Time in seconds for rest state regen to kick in with a raid target.
|
||||
RULE_INT(Character, KillsPerGroupLeadershipAA, 250) // Number of dark blues or above per Group Leadership AA
|
||||
@@ -419,6 +416,8 @@ RULE_BOOL(Combat, UseIntervalAC, true)
|
||||
RULE_INT(Combat, PetAttackMagicLevel, 30)
|
||||
RULE_BOOL(Combat, EnableFearPathing, true)
|
||||
RULE_REAL(Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker.
|
||||
RULE_BOOL(Combat, FleeGray, true) // If true FleeGrayHPRatio will be used.
|
||||
RULE_INT(Combat, FleeGrayHPRatio, 50) //HP % when a Gray NPC begins to flee.
|
||||
RULE_INT(Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee.
|
||||
RULE_BOOL(Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it.
|
||||
RULE_BOOL(Combat, AdjustProcPerMinute, true)
|
||||
@@ -532,6 +531,11 @@ RULE_INT(NPC, NPCToNPCAggroTimerMin, 500)
|
||||
RULE_INT(NPC, NPCToNPCAggroTimerMax, 6000)
|
||||
RULE_BOOL(NPC, UseClassAsLastName, true) // Uses class archetype as LastName for npcs with none
|
||||
RULE_BOOL(NPC, NewLevelScaling, true) // Better level scaling, use old if new formulas would break your server
|
||||
RULE_INT(NPC, NPCGatePercent, 5) // % at which the NPC Will attempt to gate at.
|
||||
RULE_BOOL(NPC, NPCGateNearBind, false) // Will NPC attempt to gate when near bind location?
|
||||
RULE_INT(NPC, NPCGateDistanceBind, 75) // Distance from bind before NPC will attempt to gate
|
||||
RULE_BOOL(NPC, NPCHealOnGate, true) // Will the NPC Heal on Gate.
|
||||
RULE_REAL(NPC, NPCHealOnGateAmount, 25) // How much the npc will heal on gate if enabled.
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Aggro)
|
||||
@@ -695,6 +699,7 @@ RULE_CATEGORY_END()
|
||||
RULE_CATEGORY(QueryServ)
|
||||
RULE_BOOL(QueryServ, PlayerLogChat, false) // Logs Player Chat
|
||||
RULE_BOOL(QueryServ, PlayerLogTrades, false) // Logs Player Trades
|
||||
RULE_BOOL(QueryServ, PlayerDropItems, false) // Logs Player dropping items
|
||||
RULE_BOOL(QueryServ, PlayerLogHandins, false) // Logs Player Handins
|
||||
RULE_BOOL(QueryServ, PlayerLogNPCKills, false) // Logs Player NPC Kills
|
||||
RULE_BOOL(QueryServ, PlayerLogDeletes, false) // Logs Player Deletes
|
||||
|
||||
@@ -203,6 +203,7 @@
|
||||
#define ServerOP_CZSignalNPC 0x5017
|
||||
#define ServerOP_CZSetEntityVariableByNPCTypeID 0x5018
|
||||
#define ServerOP_WWMarquee 0x5019
|
||||
#define ServerOP_QSPlayerDropItem 0x5020
|
||||
|
||||
/* Query Serv Generic Packet Flag/Type Enumeration */
|
||||
enum { QSG_LFGuild = 0 };
|
||||
@@ -1140,6 +1141,27 @@ struct QSPlayerLogTrade_Struct {
|
||||
QSTradeItems_Struct items[0];
|
||||
};
|
||||
|
||||
struct QSDropItems_Struct {
|
||||
uint32 item_id;
|
||||
uint16 charges;
|
||||
uint32 aug_1;
|
||||
uint32 aug_2;
|
||||
uint32 aug_3;
|
||||
uint32 aug_4;
|
||||
uint32 aug_5;
|
||||
};
|
||||
|
||||
struct QSPlayerDropItem_Struct {
|
||||
uint32 char_id;
|
||||
bool pickup; // 0 drop, 1 pickup
|
||||
uint32 zone_id;
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
uint16 _detail_count;
|
||||
QSDropItems_Struct items[0];
|
||||
};
|
||||
|
||||
struct QSHandinItems_Struct {
|
||||
char action_type[7]; // handin, return or reward
|
||||
uint16 char_slot;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9127
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9129
|
||||
#ifdef BOTS
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9020
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user