mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server into feature/ae-scanning-optimizations
This commit is contained in:
commit
b11528fbcc
4
.gitignore
vendored
4
.gitignore
vendored
@ -33,4 +33,6 @@ perl/
|
||||
*cbp
|
||||
|
||||
submodules/*
|
||||
cmake-build-debug/
|
||||
cmake-build-debug/
|
||||
|
||||
.nfs.*
|
||||
@ -6743,11 +6743,22 @@ void Client::SendStatsWindow(Client* client, bool use_window)
|
||||
GetRawACNoShield(shield_ac);
|
||||
|
||||
std::string skill_list[] = {
|
||||
"1H Blunt","1H Slashing","2H Blunt","2H Slashing","Abjuration","Alteration","Apply Poison","Archery","Backstab","Bind Wound","Bash","Block","Brass Instruments","Channeling","Conjuration",
|
||||
"Defense","Disarm","Disarm Traps","Divination","Dodge","Double Attack","Dragon Punch","Dual Wield","Eagle Strike","Evocation","Feign Death","Flying Kick","Forage","Hand To Hand","Hide","Kick",
|
||||
"Meditate","Mend","Offense","Parry","Pick Lock","Piercing","Riposte","Round Kick","Safe Fall","Sense Heading","Singing","Sneak","Specialize Abjuration","Specialize Alteration","Specialize Conjuration",
|
||||
"Specialize Divination","Specialize Evocation","Pick Pockets","Stringed_Instruments","Swimming","Throwing","Tiger Claw","Tracking","Wind Instruments","Fishing","Make Poison","Tinkering","Research","Alchemy",
|
||||
"Baking","Tailoring","Sense Traps","Blacksmithing","Fletching","Brewing","Alcohol_Tolerance","Begging","Jewelry Making","Pottery","Percussion Instruments","Intimidation","Berserking","Taunt","Frenzy"
|
||||
"1H Blunt","1H Slashing","2H Blunt","2H Slashing","Abjuration",
|
||||
"Alteration","Apply Poison","Archery","Backstab","Bind Wound",
|
||||
"Bash","Block","Brass Instruments","Channeling","Conjuration",
|
||||
"Defense","Disarm","Disarm Traps","Divination","Dodge",
|
||||
"Double Attack","Dragon Punch","Dual Wield","Eagle Strike","Evocation",
|
||||
"Feign Death","Flying Kick","Forage","Hand To Hand","Hide",
|
||||
"Kick","Meditate","Mend","Offense","Parry",
|
||||
"Pick Lock","1H Piercing","Riposte","Round Kick","Safe Fall",
|
||||
"Sense Heading","Singing","Sneak","Specialize Abjuration","Specialize Alteration",
|
||||
"Specialize Conjuration","Specialize Divination","Specialize Evocation","Pick Pockets","Stringed Instruments",
|
||||
"Swimming","Throwing","Tiger Claw","Tracking","Wind Instruments",
|
||||
"Fishing","Make Poison","Tinkering","Research","Alchemy",
|
||||
"Baking","Tailoring","Sense Traps","Blacksmithing","Fletching",
|
||||
"Brewing","Alcohol_Tolerance","Begging","Jewelry Making","Pottery",
|
||||
"Percussion Instruments","Intimidation","Berserking","Taunt","Frenzy",
|
||||
"Remove Traps","Triple Attack","2H Piercing"
|
||||
};
|
||||
|
||||
std::string skill_mods = "";
|
||||
|
||||
55
zone/map.cpp
55
zone/map.cpp
@ -242,46 +242,65 @@ bool Map::Load(std::string filename, bool force_mmf_overwrite)
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
bool Map::Load(std::string filename)
|
||||
|
||||
/**
|
||||
* @param filename
|
||||
* @return
|
||||
*/
|
||||
bool Map::Load(const std::string &filename)
|
||||
{
|
||||
#endif /*USE_MAP_MMFS*/
|
||||
|
||||
FILE *f = fopen(filename.c_str(), "rb");
|
||||
if(f) {
|
||||
FILE *map_file = fopen(filename.c_str(), "rb");
|
||||
if (map_file) {
|
||||
uint32 version;
|
||||
if(fread(&version, sizeof(version), 1, f) != 1) {
|
||||
fclose(f);
|
||||
if (fread(&version, sizeof(version), 1, map_file) != 1) {
|
||||
fclose(map_file);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(version == 0x01000000) {
|
||||
|
||||
if (version == 0x01000000) {
|
||||
LogInfo("Loaded V1 Map File [{}]", filename.c_str());
|
||||
bool v = LoadV1(f);
|
||||
fclose(f);
|
||||
bool loaded_map_file = LoadV1(map_file);
|
||||
fclose(map_file);
|
||||
|
||||
if (loaded_map_file) {
|
||||
LogInfo("Loaded V1 Map File [{}]", filename.c_str());
|
||||
} else {
|
||||
LogError("Failed to load V1 Map File [{}]", filename.c_str());
|
||||
}
|
||||
|
||||
#ifdef USE_MAP_MMFS
|
||||
if (v)
|
||||
return SaveMMF(filename, force_mmf_overwrite);
|
||||
#endif /*USE_MAP_MMFS*/
|
||||
|
||||
return v;
|
||||
} else if(version == 0x02000000) {
|
||||
LogInfo("Loaded V2 Map File [{}]", filename.c_str());
|
||||
bool v = LoadV2(f);
|
||||
fclose(f);
|
||||
return loaded_map_file;
|
||||
}
|
||||
else if (version == 0x02000000) {
|
||||
LogInfo("Loading V2 Map File [{}]", filename.c_str());
|
||||
bool loaded_map_file = LoadV2(map_file);
|
||||
fclose(map_file);
|
||||
|
||||
if (loaded_map_file) {
|
||||
LogInfo("Loaded V2 Map File [{}]", filename.c_str());
|
||||
} else {
|
||||
LogError("Failed to load V2 Map File [{}]", filename.c_str());
|
||||
}
|
||||
|
||||
#ifdef USE_MAP_MMFS
|
||||
if (v)
|
||||
return SaveMMF(filename, force_mmf_overwrite);
|
||||
#endif /*USE_MAP_MMFS*/
|
||||
|
||||
return v;
|
||||
} else {
|
||||
fclose(f);
|
||||
return loaded_map_file;
|
||||
}
|
||||
else {
|
||||
fclose(map_file);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ public:
|
||||
#ifdef USE_MAP_MMFS
|
||||
bool Load(std::string filename, bool force_mmf_overwrite = false);
|
||||
#else
|
||||
bool Load(std::string filename);
|
||||
bool Load(const std::string& filename);
|
||||
#endif
|
||||
|
||||
static Map *LoadMapFile(std::string file);
|
||||
|
||||
@ -610,7 +610,7 @@ int Mob::_GetWalkSpeed() const {
|
||||
runspeedcap += itembonuses.IncreaseRunSpeedCap + spellbonuses.IncreaseRunSpeedCap + aabonuses.IncreaseRunSpeedCap;
|
||||
aa_mod += aabonuses.BaseMovementSpeed;
|
||||
|
||||
if (IsClient()) {
|
||||
if (IsClient() && CastToClient()->GetHorseId()) {
|
||||
Mob *horse = entity_list.GetMob(CastToClient()->GetHorseId());
|
||||
if (horse) {
|
||||
speed_mod = horse->GetBaseRunspeed();
|
||||
@ -668,7 +668,7 @@ int Mob::_GetRunSpeed() const {
|
||||
{
|
||||
speed_mod = 325;
|
||||
}
|
||||
else
|
||||
else if (CastToClient()->GetHorseId())
|
||||
{
|
||||
Mob* horse = entity_list.GetMob(CastToClient()->GetHorseId());
|
||||
if(horse)
|
||||
|
||||
@ -10,10 +10,34 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
inline bool file_exists(const std::string& name) {
|
||||
std::ifstream f(name.c_str());
|
||||
return f.good();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param zone_name
|
||||
* @return
|
||||
*/
|
||||
WaterMap* WaterMap::LoadWaterMapfile(std::string zone_name) {
|
||||
std::transform(zone_name.begin(), zone_name.end(), zone_name.begin(), ::tolower);
|
||||
|
||||
std::string file_path = Config->MapDir + "water/" + zone_name + std::string(".wtr");
|
||||
|
||||
std::string filename;
|
||||
if (file_exists("maps")) {
|
||||
filename = "maps";
|
||||
}
|
||||
else if (file_exists("Maps")) {
|
||||
filename = "Maps";
|
||||
}
|
||||
else {
|
||||
filename = Config->MapDir;
|
||||
}
|
||||
|
||||
std::string file_path = filename + "/water/" + zone_name + std::string(".wtr");
|
||||
LogDebug("Attempting to load water map with path [{}]", file_path.c_str());
|
||||
FILE *f = fopen(file_path.c_str(), "rb");
|
||||
if(f) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user