Revert "Merge pull request #1101 from KinglyKrab/custom"

This reverts commit 43108acae1ef5eb5d127226c3fc0659dbdc10b9d, reversing
changes made to daa1db65b92cb9403c48071a044cb62b458c9afd.
This commit is contained in:
Akkadius 2020-08-03 22:21:51 -05:00
parent 43108acae1
commit bda13383ef
14 changed files with 20 additions and 190 deletions

View File

@ -378,8 +378,6 @@ const char *GetClassIDName(uint8 class_id, uint8 level)
return "Berserker Guildmaster"; return "Berserker Guildmaster";
case MERCHANT: case MERCHANT:
return "Merchant"; return "Merchant";
case DISCORD_MERCHANT:
return "Discord Merchant";
case ADVENTURERECRUITER: case ADVENTURERECRUITER:
return "Adventure Recruiter"; return "Adventure Recruiter";
case ADVENTUREMERCHANT: case ADVENTUREMERCHANT:
@ -390,18 +388,6 @@ const char *GetClassIDName(uint8 class_id, uint8 level)
return "Tribute Master"; return "Tribute Master";
case GUILD_TRIBUTE_MASTER: case GUILD_TRIBUTE_MASTER:
return "Guild Tribute Master"; return "Guild Tribute Master";
case GUILD_BANKER:
return "Guild Banker";
case NORRATHS_KEEPERS_MERCHANT:
return "Radiant Crystal Merchant";
case DARK_REIGN_MERCHANT:
return "Radiant Crystal Merchant";
case FELLOWSHIP_MASTER:
return "Fellowship Master";
case ALT_CURRENCY_MERCHANT:
return "Alternate Currency Merchant";
case MERCERNARY_MASTER:
return "Mercenary Liaison";
default: default:
return "Unknown"; return "Unknown";
} }

View File

@ -61,7 +61,6 @@
#define CORPSE_CLASS 62 // only seen on Danvi's Corpse in Akheva so far.. #define CORPSE_CLASS 62 // only seen on Danvi's Corpse in Akheva so far..
#define TRIBUTE_MASTER 63 #define TRIBUTE_MASTER 63
#define GUILD_TRIBUTE_MASTER 64 // not sure #define GUILD_TRIBUTE_MASTER 64 // not sure
#define GUILD_BANKER 66
#define NORRATHS_KEEPERS_MERCHANT 67 #define NORRATHS_KEEPERS_MERCHANT 67
#define DARK_REIGN_MERCHANT 68 #define DARK_REIGN_MERCHANT 68
#define FELLOWSHIP_MASTER 69 #define FELLOWSHIP_MASTER 69

View File

@ -497,12 +497,6 @@ RULE_INT(Combat, LevelToStopACTwinkControl, 50, "Level to stop armorclass twink
RULE_BOOL(Combat, ClassicNPCBackstab, false, "True disables npc facestab - NPCget normal attack if not behind") RULE_BOOL(Combat, ClassicNPCBackstab, false, "True disables npc facestab - NPCget normal attack if not behind")
RULE_BOOL(Combat, UseNPCDamageClassLevelMods, true, "Uses GetClassLevelDamageMod calc in npc_scale_manager") RULE_BOOL(Combat, UseNPCDamageClassLevelMods, true, "Uses GetClassLevelDamageMod calc in npc_scale_manager")
RULE_BOOL(Combat, UseExtendedPoisonProcs, false, "Allow old school poisons to last until characrer zones, at a lower proc rate") RULE_BOOL(Combat, UseExtendedPoisonProcs, false, "Allow old school poisons to last until characrer zones, at a lower proc rate")
RULE_BOOL(Combat, CustomScaling, false, "Use Custom Scaling.")
RULE_REAL(Combat, CustomScalingMeleeMitigation, 2500.0, "Custom Melee Mitigation Scaling (AGI / VALUE)")
RULE_REAL(Combat, CustomScalingMeleeDamage, 100.0, "Custom Melee Damage Scaling (STR / VALUE)")
RULE_REAL(Combat, CustomScalingSkillDamage, 100.0, "Custom Skill Damage Scaling (DEX / VALUE)")
RULE_REAL(Combat, CustomScalingSpellDamage, 100.0, "Custom Spell Damage Scaling (INT / VALUE)")
RULE_REAL(Combat, CustomScalingSpellHealing, 100.0, "Custom Spell Healing Scaling (WIS / VALUE)")
RULE_CATEGORY_END() RULE_CATEGORY_END()
RULE_CATEGORY(NPC) RULE_CATEGORY(NPC)

View File

@ -633,9 +633,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S
rankstring=5009; rankstring=5009;
else if (cle->Admin() >= 20) else if (cle->Admin() >= 20)
rankstring=5008; rankstring=5008;
} else if (cle->Admin() >= 10)
if (cle->Admin() == 1) {
rankstring=5007; rankstring=5007;
} }
idx++; idx++;

View File

@ -87,7 +87,7 @@ EQ::skills::SkillType Mob::AttackAnimation(int Hand, const EQ::ItemInstance* wea
break; break;
case EQ::item::ItemType2HBlunt: // 2H Blunt case EQ::item::ItemType2HBlunt: // 2H Blunt
skillinuse = EQ::skills::Skill2HBlunt; skillinuse = EQ::skills::Skill2HBlunt;
type = anim2HWeapon; //anim2HWeapon type = anim2HSlashing; //anim2HWeapon
break; break;
case EQ::item::ItemType2HPiercing: // 2H Piercing case EQ::item::ItemType2HPiercing: // 2H Piercing
if (IsClient() && CastToClient()->ClientVersion() < EQ::versions::ClientVersion::RoF2) if (IsClient() && CastToClient()->ClientVersion() < EQ::versions::ClientVersion::RoF2)
@ -121,7 +121,7 @@ EQ::skills::SkillType Mob::AttackAnimation(int Hand, const EQ::ItemInstance* wea
type = anim1HWeapon; type = anim1HWeapon;
break; break;
case EQ::skills::Skill2HBlunt: // 2H Blunt case EQ::skills::Skill2HBlunt: // 2H Blunt
type = anim2HWeapon; //anim2HWeapon type = anim2HSlashing; //anim2HWeapon
break; break;
case EQ::skills::Skill2HPiercing: // 2H Piercing case EQ::skills::Skill2HPiercing: // 2H Piercing
type = anim2HWeapon; type = anim2HWeapon;
@ -1532,14 +1532,6 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
SpellFinished(aabonuses.SkillAttackProc[2], other, EQ::spells::CastingSlot::Item, 0, -1, SpellFinished(aabonuses.SkillAttackProc[2], other, EQ::spells::CastingSlot::Item, 0, -1,
spells[aabonuses.SkillAttackProc[2]].ResistDiff); spells[aabonuses.SkillAttackProc[2]].ResistDiff);
} }
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.STR;
float melee_damage_scale = RuleR(Combat, CustomScalingMeleeDamage);
if (scale_value > int(melee_damage_scale)) {
my_hit.damage_done = int(static_cast<float>(my_hit.damage_done) * static_cast<float>(scale_value / melee_damage_scale));
}
}
other->Damage(this, my_hit.damage_done, SPELL_UNKNOWN, my_hit.skill, true, -1, false, m_specialattacks); other->Damage(this, my_hit.damage_done, SPELL_UNKNOWN, my_hit.skill, true, -1, false, m_specialattacks);
if (IsDead()) return false; if (IsDead()) return false;

View File

@ -1035,21 +1035,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
return; return;
} }
} }
uint8 admin_level = Admin();
char *custom_rank = (
admin_level ?
(
admin_level == 1 ?
"[Donator] " :
(
admin_level == 255 ?
"[Admin] " :
""
)
) :
""
);
strn0cpy(message, strcat(custom_rank, message), 4096);
if (!worldserver.SendChannelMessage(this, 0, chan_num, 0, language, lang_skill, message)) if (!worldserver.SendChannelMessage(this, 0, chan_num, 0, language, lang_skill, message))
{ {
Message(0, "Error: World server disconnected"); Message(0, "Error: World server disconnected");

View File

@ -160,14 +160,6 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
if (IsNPC() && CastToNPC()->GetSpellScale()) if (IsNPC() && CastToNPC()->GetSpellScale())
value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f); value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f);
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.INT;
float spell_damage_scale = RuleR(Combat, CustomScalingSpellDamage);
if (scale_value > int(spell_damage_scale)) {
value = int(static_cast<float>(value) * static_cast<float>(scale_value / spell_damage_scale));
}
}
return value; return value;
} }
@ -237,14 +229,6 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) {
if (IsNPC() && CastToNPC()->GetSpellScale()) if (IsNPC() && CastToNPC()->GetSpellScale())
value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f); value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f);
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.INT;
float spell_damage_scale = RuleR(Combat, CustomScalingSpellDamage);
if (scale_value > spell_damage_scale) {
value = int(static_cast<float>(value) * static_cast<float>(scale_value / spell_damage_scale));
}
}
return value; return value;
} }
@ -332,14 +316,6 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
MessageString(Chat::SpellCrit, YOU_CRIT_HEAL, itoa(value)); MessageString(Chat::SpellCrit, YOU_CRIT_HEAL, itoa(value));
} }
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.WIS;
float spell_damage_scale = RuleR(Combat, CustomScalingSpellDamage);
if (scale_value > int(spell_damage_scale)) {
value = int(static_cast<float>(value) * static_cast<float>(scale_value / spell_damage_scale));
}
}
return value; return value;
} }
@ -360,14 +336,6 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
if (IsNPC() && CastToNPC()->GetHealScale()) if (IsNPC() && CastToNPC()->GetHealScale())
value = int(static_cast<float>(value) * CastToNPC()->GetHealScale() / 100.0f); value = int(static_cast<float>(value) * CastToNPC()->GetHealScale() / 100.0f);
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.WIS;
float spell_healing_scale = RuleR(Combat, CustomScalingSpellHealing);
if (scale_value > int(spell_healing_scale)) {
value = int(static_cast<float>(value) * static_cast<float>(scale_value / spell_healing_scale));
}
}
return value; return value;
} }

View File

@ -2913,23 +2913,6 @@ XS(XS__countitem) {
XSRETURN_IV(quantity); XSRETURN_IV(quantity);
} }
XS(XS__removeitem);
XS(XS__removeitem) {
dXSARGS;
if (items < 1 || items > 2)
Perl_croak(aTHX_ "Usage: quest::removeitem(int item_id, [int quantity = 1])");
uint32 item_id = (int) SvIV(ST(0));
uint32 quantity = 1;
if (items > 1) {
quantity = (int) SvIV(ST(1));
}
quest_manager.removeitem(item_id, quantity);
XSRETURN_EMPTY;
}
XS(XS__getitemname); XS(XS__getitemname);
XS(XS__getitemname) { XS(XS__getitemname) {
dXSARGS; dXSARGS;
@ -6314,7 +6297,6 @@ EXTERN_C XS(boot_quest) {
newXS(strcpy(buf, "rain"), XS__rain, file); newXS(strcpy(buf, "rain"), XS__rain, file);
newXS(strcpy(buf, "rebind"), XS__rebind, file); newXS(strcpy(buf, "rebind"), XS__rebind, file);
newXS(strcpy(buf, "reloadzonestaticdata"), XS__reloadzonestaticdata, file); newXS(strcpy(buf, "reloadzonestaticdata"), XS__reloadzonestaticdata, file);
newXS(strcpy(buf, "removeitem"), XS__removeitem, file);
newXS(strcpy(buf, "removetitle"), XS__removetitle, file); newXS(strcpy(buf, "removetitle"), XS__removetitle, file);
newXS(strcpy(buf, "repopzone"), XS__repopzone, file); newXS(strcpy(buf, "repopzone"), XS__repopzone, file);
newXS(strcpy(buf, "resettaskactivity"), XS__resettaskactivity, file); newXS(strcpy(buf, "resettaskactivity"), XS__resettaskactivity, file);

View File

@ -802,14 +802,6 @@ int lua_count_item(uint32 item_id) {
return quest_manager.countitem(item_id); return quest_manager.countitem(item_id);
} }
void lua_remove_item(uint32 item_id) {
quest_manager.removeitem(item_id);
}
void lua_remove_item(uint32 item_id, uint32 quantity) {
quest_manager.removeitem(item_id, quantity);
}
void lua_update_spawn_timer(uint32 id, uint32 new_time) { void lua_update_spawn_timer(uint32 id, uint32 new_time) {
quest_manager.UpdateSpawnTimer(id, new_time); quest_manager.UpdateSpawnTimer(id, new_time);
} }
@ -2490,8 +2482,6 @@ luabind::scope lua_register_general() {
luabind::def("modify_npc_stat", &lua_modify_npc_stat), luabind::def("modify_npc_stat", &lua_modify_npc_stat),
luabind::def("collect_items", &lua_collect_items), luabind::def("collect_items", &lua_collect_items),
luabind::def("count_item", &lua_count_item), luabind::def("count_item", &lua_count_item),
luabind::def("remove_item", (void(*)(uint32))&lua_remove_item),
luabind::def("remove_item", (void(*)(uint32,uint32))&lua_remove_item),
luabind::def("update_spawn_timer", &lua_update_spawn_timer), luabind::def("update_spawn_timer", &lua_update_spawn_timer),
luabind::def("merchant_set_item", (void(*)(uint32,uint32))&lua_merchant_set_item), luabind::def("merchant_set_item", (void(*)(uint32,uint32))&lua_merchant_set_item),
luabind::def("merchant_set_item", (void(*)(uint32,uint32,uint32))&lua_merchant_set_item), luabind::def("merchant_set_item", (void(*)(uint32,uint32,uint32))&lua_merchant_set_item),

View File

@ -5677,14 +5677,6 @@ int32 Mob::GetMeleeMitigation() {
mitigation += spellbonuses.MeleeMitigationEffect; mitigation += spellbonuses.MeleeMitigationEffect;
mitigation += itembonuses.MeleeMitigationEffect; mitigation += itembonuses.MeleeMitigationEffect;
mitigation += aabonuses.MeleeMitigationEffect; mitigation += aabonuses.MeleeMitigationEffect;
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.AGI;
float melee_mitigation_scale = RuleR(Combat, CustomScalingMeleeMitigation);
if (scale_value > int(melee_mitigation_scale)) {
mitigation = int(static_cast<float>(mitigation) + static_cast<float>(scale_value / melee_mitigation_scale));
}
}
return mitigation; return mitigation;
} }

View File

@ -2720,40 +2720,6 @@ int QuestManager::countitem(uint32 item_id) {
return quantity; return quantity;
} }
void QuestManager::removeitem(uint32 item_id, uint32 quantity) {
QuestManagerCurrentQuestVars();
EQ::ItemInstance *item = nullptr;
static const int16 slots[][2] = {
{ EQ::invslot::POSSESSIONS_BEGIN, EQ::invslot::POSSESSIONS_END },
{ EQ::invbag::GENERAL_BAGS_BEGIN, EQ::invbag::GENERAL_BAGS_END },
{ EQ::invbag::CURSOR_BAG_BEGIN, EQ::invbag::CURSOR_BAG_END},
{ EQ::invslot::BANK_BEGIN, EQ::invslot::BANK_END },
{ EQ::invbag::BANK_BAGS_BEGIN, EQ::invbag::BANK_BAGS_END },
{ EQ::invslot::SHARED_BANK_BEGIN, EQ::invslot::SHARED_BANK_END },
{ EQ::invbag::SHARED_BANK_BAGS_BEGIN, EQ::invbag::SHARED_BANK_BAGS_END },
};
int removed_count = 0;
const size_t size = sizeof(slots) / sizeof(slots[0]);
for (int slot_index = 0; slot_index < size; ++slot_index) {
for (int slot_id = slots[slot_index][0]; slot_id <= slots[slot_index][1]; ++slot_id) {
item = initiator->GetInv().GetItem(slot_id);
if (item && item->GetID() == item_id) {
int stack_size = item->IsStackable() ? item->GetCharges() : 1;
if ((removed_count + stack_size) <= quantity) {
removed_count += stack_size;
initiator->DeleteItemInInventory(slot_id, stack_size, true);
} else {
int amount_left = (quantity - removed_count);
if (amount_left > 0 && stack_size >= amount_left) {
removed_count += amount_left;
initiator->DeleteItemInInventory(slot_id, amount_left, true);
}
}
}
}
}
}
void QuestManager::UpdateSpawnTimer(uint32 id, uint32 newTime) void QuestManager::UpdateSpawnTimer(uint32 id, uint32 newTime)
{ {
bool found = false; bool found = false;

View File

@ -226,7 +226,6 @@ public:
int collectitems(uint32 item_id, bool remove); int collectitems(uint32 item_id, bool remove);
int collectitems_processSlot(int16 slot_id, uint32 item_id, bool remove); int collectitems_processSlot(int16 slot_id, uint32 item_id, bool remove);
int countitem(uint32 item_id); int countitem(uint32 item_id);
void removeitem(uint32 item_id, uint32 quantity = 1);
std::string getitemname(uint32 item_id); std::string getitemname(uint32 item_id);
void enabletitle(int titleset); void enabletitle(int titleset);
bool checktitle(int titlecheck); bool checktitle(int titlecheck);

View File

@ -201,14 +201,6 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQ::skills::SkillType skill, int32 bas
spells[aabonuses.SkillAttackProc[2]].ResistDiff); spells[aabonuses.SkillAttackProc[2]].ResistDiff);
} }
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.DEX;
float skill_damage_scale = RuleR(Combat, CustomScalingSkillDamage);
if (scale_value > int(skill_damage_scale)) {
my_hit.damage_done = int(static_cast<float>(my_hit.damage_done) * static_cast<float>(scale_value / skill_damage_scale));
}
}
who->Damage(this, my_hit.damage_done, SPELL_UNKNOWN, skill, false); who->Damage(this, my_hit.damage_done, SPELL_UNKNOWN, skill, false);
// Make sure 'this' has not killed the target and 'this' is not dead (Damage shield ect). // Make sure 'this' has not killed the target and 'this' is not dead (Damage shield ect).

View File

@ -2408,13 +2408,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
//need a bard version of this prolly... //need a bard version of this prolly...
//if(caster) //if(caster)
// dmg = caster->GetActSpellDamage(spell_id, dmg); // dmg = caster->GetActSpellDamage(spell_id, dmg);
if (RuleB(Combat, CustomScaling) && caster && caster->IsClient()) {
int scale_value = caster->GetItemBonuses().INT;
float spell_damage_scale = RuleR(Combat, CustomScalingSpellDamage);
if (scale_value > int(spell_damage_scale)) {
dmg = int(static_cast<float>(dmg) * static_cast<float>(scale_value / spell_damage_scale));
}
}
dmg = -dmg; dmg = -dmg;
Damage(caster, dmg, spell_id, spell.skill, false, buffslot, false); Damage(caster, dmg, spell_id, spell.skill, false, buffslot, false);
} else if(dmg > 0) { } else if(dmg > 0) {
@ -3582,14 +3576,6 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
/*effect_value > 0 ||*/ DivineAura()) /*effect_value > 0 ||*/ DivineAura())
break; break;
if (RuleB(Combat, CustomScaling) && caster && caster->IsClient()) {
int scale_value = caster->GetItemBonuses().INT;
float spell_damage_scale = RuleR(Combat, CustomScalingSpellDamage);
if (scale_value > int(spell_damage_scale)) {
effect_value = int(static_cast<float>(effect_value) * static_cast<float>(scale_value / spell_damage_scale));
}
}
if (effect_value < 0) { if (effect_value < 0) {
effect_value = -effect_value; effect_value = -effect_value;
if (caster) { if (caster) {