mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Revert "Merge pull request #1101 from KinglyKrab/custom"
This reverts commit43108acae1, reversing changes made todaa1db65b9.
This commit is contained in:
+2
-10
@@ -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;
|
||||
|
||||
+1
-15
@@ -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);
|
||||
|
||||
@@ -200,14 +200,6 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQ::skills::SkillType skill, int32 bas
|
||||
SpellFinished(aabonuses.SkillAttackProc[2], who, EQ::spells::CastingSlot::Item, 0, -1,
|
||||
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);
|
||||
|
||||
|
||||
+1
-15
@@ -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) {
|
||||
@@ -3581,14 +3575,6 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
if ((!RuleB(Spells, PreNerfBardAEDoT) && IsMoving()) || invulnerable ||
|
||||
/*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;
|
||||
|
||||
Reference in New Issue
Block a user