From eff818ca424e5a7029ba9174067aa2e7748adaac Mon Sep 17 00:00:00 2001 From: JJ Date: Sat, 21 Feb 2015 20:46:19 -0500 Subject: [PATCH 1/2] Manual merge of #376 for Erudite starting zones. --- changelog.txt | 3 +++ world/worlddb.cpp | 28 ++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/changelog.txt b/changelog.txt index 931ccf079..f12dfd0ae 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/21/2015 == +Noudess: Starting erudites that were supposed to start in paineel were landing in erudin on Titanium. Fixed to be paineel. + == 02/20/2015 == demonstar55: Implement claims for RoF/RoF2 (should no longer crash the client!) - fixed bugs related to claims for the rest of the clients (woo infinite loops) diff --git a/world/worlddb.cpp b/world/worlddb.cpp index 8bcd03590..9a2bb630a 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -276,7 +276,8 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou } } -int WorldDatabase::MoveCharacterToBind(int CharID, uint8 bindnum) { +int WorldDatabase::MoveCharacterToBind(int CharID, uint8 bindnum) +{ /* if an invalid bind point is specified, use the primary bind */ if (bindnum > 4) { @@ -359,6 +360,7 @@ bool WorldDatabase::GetStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct* return true; } + void WorldDatabase::SetSoFDefaultStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct* in_cc){ if (in_cc->start_zone == RuleI(World, TutorialZoneID)) { in_pp->zone_id = in_cc->start_zone; @@ -377,8 +379,16 @@ void WorldDatabase::SetTitaniumDefaultStartZone(PlayerProfile_Struct* in_pp, Cha { case 0: { - in_pp->zone_id = 24; // erudnext - in_pp->binds[0].zoneId = 38; // tox + if (in_cc->deity == 203) // Cazic-Thule Erudites go to Paineel + { + in_pp->zone_id = 75; // paineel + in_pp->binds[0].zoneId = 75; + } + else + { + in_pp->zone_id = 24; // erudnext + in_pp->binds[0].zoneId = 38; // tox + } break; } case 1: @@ -461,6 +471,7 @@ void WorldDatabase::SetTitaniumDefaultStartZone(PlayerProfile_Struct* in_pp, Cha } } } + void WorldDatabase::GetLauncherList(std::vector &rl) { rl.clear(); @@ -476,8 +487,8 @@ void WorldDatabase::GetLauncherList(std::vector &rl) { } -void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) { - +void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) +{ char MailKeyString[17]; if(RuleB(Chat, EnableMailKeyIPVerification) == true) @@ -511,7 +522,8 @@ bool WorldDatabase::GetCharacterLevel(const char *name, int &level) return true; } -bool WorldDatabase::LoadCharacterCreateAllocations() { +bool WorldDatabase::LoadCharacterCreateAllocations() +{ character_create_allocations.clear(); std::string query = "SELECT * FROM char_create_point_allocations ORDER BY id"; @@ -543,7 +555,8 @@ bool WorldDatabase::LoadCharacterCreateAllocations() { return true; } -bool WorldDatabase::LoadCharacterCreateCombos() { +bool WorldDatabase::LoadCharacterCreateCombos() +{ character_create_race_class_combos.clear(); std::string query = "SELECT * FROM char_create_combinations ORDER BY race, class, deity, start_zone"; @@ -565,4 +578,3 @@ bool WorldDatabase::LoadCharacterCreateCombos() { return true; } - From c8c2209617b2332240d8641d0fe43dfcba2b6817 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Sat, 21 Feb 2015 23:04:24 -0500 Subject: [PATCH 2/2] Fix for perl defensive/ranged proc function Minor fix to NPC ranged attack. --- zone/perl_npc.cpp | 4 ++-- zone/special_attacks.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index bbefef2ed..f06623f4a 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -2343,7 +2343,7 @@ XS(XS_NPC_AddRangedProc) { if(THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - THIS->AddDefensiveProc(spell_id,chance); + THIS->AddRangedProc(spell_id,chance); } XSRETURN_EMPTY; } @@ -2368,7 +2368,7 @@ XS(XS_NPC_AddDefensiveProc) { if(THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - THIS->AddProcToWeapon(spell_id, true, chance); + THIS->AddDefensiveProc(spell_id,chance); } XSRETURN_EMPTY; } diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index c0844c2ac..faae0e3b1 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -1186,7 +1186,6 @@ float Mob::GetRangeDistTargetSizeMod(Mob* other) void NPC::RangedAttack(Mob* other) { - if (!other) return; //make sure the attack and ranged timers are up @@ -1306,7 +1305,7 @@ void NPC::DoRangedAttackDmg(Mob* other, bool Launch, int16 damage_mod, int16 cha if (TotalDmg > 0) CommonOutgoingHitSuccess(other, TotalDmg, skillInUse); - else + else if (TotalDmg < -4) TotalDmg = -5; if (TotalDmg > 0)