mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 19:51:29 +00:00
Revert "Merge pull request #1101 from KinglyKrab/custom"
This reverts commit 43108acae1ef5eb5d127226c3fc0659dbdc10b9d, reversing changes made to daa1db65b92cb9403c48071a044cb62b458c9afd.
This commit is contained in:
parent
43108acae1
commit
bda13383ef
@ -378,8 +378,6 @@ const char *GetClassIDName(uint8 class_id, uint8 level)
|
||||
return "Berserker Guildmaster";
|
||||
case MERCHANT:
|
||||
return "Merchant";
|
||||
case DISCORD_MERCHANT:
|
||||
return "Discord Merchant";
|
||||
case ADVENTURERECRUITER:
|
||||
return "Adventure Recruiter";
|
||||
case ADVENTUREMERCHANT:
|
||||
@ -390,18 +388,6 @@ const char *GetClassIDName(uint8 class_id, uint8 level)
|
||||
return "Tribute Master";
|
||||
case 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:
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
@ -61,7 +61,6 @@
|
||||
#define CORPSE_CLASS 62 // only seen on Danvi's Corpse in Akheva so far..
|
||||
#define TRIBUTE_MASTER 63
|
||||
#define GUILD_TRIBUTE_MASTER 64 // not sure
|
||||
#define GUILD_BANKER 66
|
||||
#define NORRATHS_KEEPERS_MERCHANT 67
|
||||
#define DARK_REIGN_MERCHANT 68
|
||||
#define FELLOWSHIP_MASTER 69
|
||||
|
||||
@ -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, 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, 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(NPC)
|
||||
|
||||
@ -606,37 +606,35 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S
|
||||
continue;
|
||||
} else if (cle->GetGM()) {
|
||||
if (cle->Admin() >=250)
|
||||
rankstring = 5021;
|
||||
rankstring=5021;
|
||||
else if (cle->Admin() >= 200)
|
||||
rankstring = 5020;
|
||||
rankstring=5020;
|
||||
else if (cle->Admin() >= 180)
|
||||
rankstring = 5019;
|
||||
rankstring=5019;
|
||||
else if (cle->Admin() >= 170)
|
||||
rankstring = 5018;
|
||||
rankstring=5018;
|
||||
else if (cle->Admin() >= 160)
|
||||
rankstring = 5017;
|
||||
rankstring=5017;
|
||||
else if (cle->Admin() >= 150)
|
||||
rankstring = 5016;
|
||||
rankstring=5016;
|
||||
else if (cle->Admin() >= 100)
|
||||
rankstring = 5015;
|
||||
rankstring=5015;
|
||||
else if (cle->Admin() >= 95)
|
||||
rankstring = 5014;
|
||||
rankstring=5014;
|
||||
else if (cle->Admin() >= 90)
|
||||
rankstring = 5013;
|
||||
rankstring=5013;
|
||||
else if (cle->Admin() >= 85)
|
||||
rankstring = 5012;
|
||||
rankstring=5012;
|
||||
else if (cle->Admin() >= 81)
|
||||
rankstring = 5011;
|
||||
rankstring=5011;
|
||||
else if (cle->Admin() >= 80)
|
||||
rankstring = 5010;
|
||||
rankstring=5010;
|
||||
else if (cle->Admin() >= 50)
|
||||
rankstring = 5009;
|
||||
rankstring=5009;
|
||||
else if (cle->Admin() >= 20)
|
||||
rankstring = 5008;
|
||||
}
|
||||
|
||||
if (cle->Admin() == 1) {
|
||||
rankstring = 5007;
|
||||
rankstring=5008;
|
||||
else if (cle->Admin() >= 10)
|
||||
rankstring=5007;
|
||||
}
|
||||
idx++;
|
||||
char guildbuffer[67]={0};
|
||||
|
||||
@ -87,7 +87,7 @@ EQ::skills::SkillType Mob::AttackAnimation(int Hand, const EQ::ItemInstance* wea
|
||||
break;
|
||||
case EQ::item::ItemType2HBlunt: // 2H Blunt
|
||||
skillinuse = EQ::skills::Skill2HBlunt;
|
||||
type = anim2HWeapon; //anim2HWeapon
|
||||
type = anim2HSlashing; //anim2HWeapon
|
||||
break;
|
||||
case EQ::item::ItemType2HPiercing: // 2H Piercing
|
||||
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;
|
||||
break;
|
||||
case EQ::skills::Skill2HBlunt: // 2H Blunt
|
||||
type = anim2HWeapon; //anim2HWeapon
|
||||
type = anim2HSlashing; //anim2HWeapon
|
||||
break;
|
||||
case EQ::skills::Skill2HPiercing: // 2H Piercing
|
||||
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,
|
||||
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);
|
||||
|
||||
if (IsDead()) return false;
|
||||
|
||||
@ -1035,21 +1035,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
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))
|
||||
{
|
||||
Message(0, "Error: World server disconnected");
|
||||
|
||||
@ -160,14 +160,6 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
if (IsNPC() && CastToNPC()->GetSpellScale())
|
||||
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;
|
||||
}
|
||||
|
||||
@ -237,14 +229,6 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
if (IsNPC() && CastToNPC()->GetSpellScale())
|
||||
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;
|
||||
}
|
||||
|
||||
@ -332,14 +316,6 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -360,14 +336,6 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
if (IsNPC() && CastToNPC()->GetHealScale())
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -2913,23 +2913,6 @@ XS(XS__countitem) {
|
||||
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) {
|
||||
dXSARGS;
|
||||
@ -6314,7 +6297,6 @@ EXTERN_C XS(boot_quest) {
|
||||
newXS(strcpy(buf, "rain"), XS__rain, file);
|
||||
newXS(strcpy(buf, "rebind"), XS__rebind, 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, "repopzone"), XS__repopzone, file);
|
||||
newXS(strcpy(buf, "resettaskactivity"), XS__resettaskactivity, file);
|
||||
|
||||
@ -802,14 +802,6 @@ int lua_count_item(uint32 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) {
|
||||
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("collect_items", &lua_collect_items),
|
||||
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("merchant_set_item", (void(*)(uint32,uint32))&lua_merchant_set_item),
|
||||
luabind::def("merchant_set_item", (void(*)(uint32,uint32,uint32))&lua_merchant_set_item),
|
||||
|
||||
@ -5677,14 +5677,6 @@ int32 Mob::GetMeleeMitigation() {
|
||||
mitigation += spellbonuses.MeleeMitigationEffect;
|
||||
mitigation += itembonuses.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;
|
||||
}
|
||||
|
||||
|
||||
@ -2720,40 +2720,6 @@ int QuestManager::countitem(uint32 item_id) {
|
||||
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)
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
@ -226,7 +226,6 @@ public:
|
||||
int collectitems(uint32 item_id, bool remove);
|
||||
int collectitems_processSlot(int16 slot_id, uint32 item_id, bool remove);
|
||||
int countitem(uint32 item_id);
|
||||
void removeitem(uint32 item_id, uint32 quantity = 1);
|
||||
std::string getitemname(uint32 item_id);
|
||||
void enabletitle(int titleset);
|
||||
bool checktitle(int titlecheck);
|
||||
|
||||
@ -201,14 +201,6 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQ::skills::SkillType skill, int32 bas
|
||||
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);
|
||||
|
||||
// Make sure 'this' has not killed the target and 'this' is not dead (Damage shield ect).
|
||||
|
||||
@ -2408,13 +2408,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
//need a bard version of this prolly...
|
||||
//if(caster)
|
||||
// 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;
|
||||
Damage(caster, dmg, spell_id, spell.skill, false, buffslot, false);
|
||||
} else if(dmg > 0) {
|
||||
@ -3582,14 +3576,6 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
/*effect_value > 0 ||*/ DivineAura())
|
||||
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) {
|
||||
effect_value = -effect_value;
|
||||
if (caster) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user