mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-21 23:48:26 +00:00
Added sanity fixes for testing
This commit is contained in:
+4
-2
@@ -188,8 +188,10 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
berserk = false;
|
||||
dead = false;
|
||||
eqs = ieqs;
|
||||
ip = eqs->GetRemoteIP();
|
||||
port = ntohs(eqs->GetRemotePort());
|
||||
if (eqs) {
|
||||
ip = eqs->GetRemoteIP();
|
||||
port = ntohs(eqs->GetRemotePort());
|
||||
}
|
||||
client_state = CLIENT_CONNECTING;
|
||||
Trader=false;
|
||||
Buyer = false;
|
||||
|
||||
@@ -4295,6 +4295,12 @@ void Mob::TriggerDefensiveProcs(Mob *on, uint16 hand, bool FromSkillProc, int da
|
||||
if (!on) {
|
||||
return;
|
||||
}
|
||||
if (on->GetHP() == 0) {
|
||||
return;
|
||||
}
|
||||
if (on->HasDied()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!FromSkillProc) {
|
||||
on->TryDefensiveProc(this, hand);
|
||||
|
||||
@@ -234,6 +234,9 @@ bool NpcScaleManager::LoadScaleData()
|
||||
*/
|
||||
NpcScaleManager::global_npc_scale NpcScaleManager::GetGlobalScaleDataForTypeLevel(int8 npc_type, int npc_level)
|
||||
{
|
||||
if (npc_type < 1) {
|
||||
return {};
|
||||
}
|
||||
auto iter = npc_global_base_scaling_data.find(std::make_pair(npc_type, npc_level));
|
||||
if (iter != npc_global_base_scaling_data.end()) {
|
||||
return iter->second;
|
||||
|
||||
@@ -471,6 +471,9 @@ int QuestParserCollection::EventEncounter(QuestEventID evt, std::string encounte
|
||||
}
|
||||
|
||||
QuestInterface *QuestParserCollection::GetQIByNPCQuest(uint32 npcid, std::string &filename) {
|
||||
if (!Config) {
|
||||
return nullptr;
|
||||
}
|
||||
//first look for /quests/zone/npcid.ext (precedence)
|
||||
filename = Config->QuestDir;
|
||||
filename += zone->GetShortName();
|
||||
@@ -699,6 +702,9 @@ QuestInterface *QuestParserCollection::GetQIByPlayerQuest(std::string &filename)
|
||||
}
|
||||
|
||||
QuestInterface *QuestParserCollection::GetQIByGlobalNPCQuest(std::string &filename) {
|
||||
if (!Config) {
|
||||
return nullptr;
|
||||
}
|
||||
// simply look for /quests/global/global_npc.ext
|
||||
filename = Config->QuestDir;
|
||||
filename += QUEST_GLOBAL_DIRECTORY;
|
||||
@@ -1003,6 +1009,7 @@ void QuestParserCollection::GetErrors(std::list<std::string> &err) {
|
||||
int QuestParserCollection::DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
int ret = 0;
|
||||
if (_load_precedence.size() == 0) return ret;
|
||||
auto iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
int i = (*iter)->DispatchEventNPC(evt, npc, init, data, extra_data, extra_pointers);
|
||||
|
||||
@@ -22,6 +22,9 @@ TaskProximityManager::~TaskProximityManager()
|
||||
|
||||
bool TaskProximityManager::LoadProximities(int zone_id)
|
||||
{
|
||||
if (zone_id == -1) {
|
||||
return false;
|
||||
}
|
||||
TaskProximity proximity{};
|
||||
m_task_proximities.clear();
|
||||
|
||||
|
||||
+3
-1
@@ -965,7 +965,9 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
merchantvar = 0;
|
||||
tradevar = 0;
|
||||
lootvar = 0;
|
||||
|
||||
if (zoneid == -1) {
|
||||
return;
|
||||
}
|
||||
if(RuleB(TaskSystem, EnableTaskSystem)) {
|
||||
task_manager->LoadProximities(zoneid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user