diff --git a/changelog.txt b/changelog.txt index 546be96d3..efac3956a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,28 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 06/16/2013 == +Secrets: Fixed an issue with RoF items and Req/Rec level above 100 appearing yellow. Recommended to enable the #iteminfo command for items that have a req/rec above 100 to display proper information regarding the info. + +== 06/15/2013 == +KLS: (image) Potentially could bypass some spell checks by passing a specially crafted spell slot. This has been addressed. + +== 06/12/2013 == +KLS: Merge Hateborne's hp cap stuff +KLS: We haven't updated changelog in a while but there's been: + -Some string stuff + -A lot of fixes to things like caps. + -More work on custom mod stuff (including examples) + -Fix for login not bailing out if it cant connect to a db + -Quite a few warning changes. + +== 05/09/2013 == +Uleat: (Updated: 06/12/2013) Fixed a few observed bot issues and an beneficial AE casting bug: + Added missing Bot primary weapon proc call (secondary and ranged already exist) + Added Bard Bot instrumentation bonuses + Added checks to avoid AE Buff casting on enemy mobs + Fixed a few typos in 'Vah Shir'-related code + (Please post any discrepancies as bugs) + == 05/05/2013 == Tabasco: Added EVENT_ITEM_TICK for interactive item quest scripts. (See https://github.com/josheb/quests_dc/blob/master/items/12204.pl) Added simple account flags. Would this work better as an additional qglobal category? diff --git a/common/patches/RoF.cpp b/common/patches/RoF.cpp index da19e8d91..03893086c 100644 --- a/common/patches/RoF.cpp +++ b/common/patches/RoF.cpp @@ -4992,7 +4992,11 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint ibs.Magic = item->Magic; ibs.CastTime_ = item->CastTime_; ibs.ReqLevel = item->ReqLevel; + if(item->ReqLevel > 100) + ibs.ReqLevel = 100; ibs.RecLevel = item->RecLevel; + if(item->RecLevel > 100) + ibs.RecLevel = 100; ibs.RecSkill = item->RecSkill; ibs.BardType = item->BardType; ibs.BardValue = item->BardValue; diff --git a/common/spdat.h b/common/spdat.h index c2445a89a..5d317f693 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -625,7 +625,7 @@ struct SPDat_Spell_Struct /* 019 */ uint16 mana; // Mana Used /* 020 */ int base[EFFECT_COUNT]; //various purposes /* 032 */ int base2[EFFECT_COUNT]; //various purposes -/* 044 */ int16 max[EFFECT_COUNT]; +/* 044 */ int32 max[EFFECT_COUNT]; /* 056 */ //uint16 icon; // Spell icon /* 057 */ //uint16 memicon; // Icon on membarthing /* 058 */ int32 components[4]; // reagents diff --git a/zone/bot.cpp b/zone/bot.cpp index 8b6100c9a..39911c3aa 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -11016,7 +11016,7 @@ int32 Bot::CalcMaxHP() { bot_hp += GroupLeadershipAAHealthEnhancement(); - bot_hp += bot_hp * (spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000; + bot_hp += bot_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); max_hp = bot_hp; if (cur_hp > max_hp) diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index eaab0ba81..b05b30e77 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -250,7 +250,7 @@ int32 Client::CalcMaxHP() { max_hp += GroupLeadershipAAHealthEnhancement(); - max_hp += max_hp * (spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000; + max_hp += max_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); if (cur_hp > max_hp) cur_hp = max_hp; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index e0566b17b..856cc5f09 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4562,7 +4562,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app) LogFile->write(EQEMuLog::Debug, "cs_unknown2: 16 %p %u %u", &castspell->cs_unknown, *(uint16*) castspell->cs_unknown, *(uint16*) castspell->cs_unknown+sizeof(uint16) ); LogFile->write(EQEMuLog::Debug, "cs_unknown2: 16 %p %i %i", &castspell->cs_unknown, *(uint16*) castspell->cs_unknown, *(uint16*) castspell->cs_unknown+sizeof(uint16) ); #endif -LogFile->write(EQEMuLog::Debug, "OP CastSpell: slot=%d, spell=%d, target=%d, inv=%lx", castspell->slot, castspell->spell_id, castspell->target_id, (unsigned long)castspell->inventoryslot); + LogFile->write(EQEMuLog::Debug, "OP CastSpell: slot=%d, spell=%d, target=%d, inv=%lx", castspell->slot, castspell->spell_id, castspell->target_id, (unsigned long)castspell->inventoryslot); if ((castspell->slot == USE_ITEM_SPELL_SLOT) || (castspell->slot == POTION_BELT_SPELL_SLOT)) // this means item { @@ -4671,47 +4671,24 @@ LogFile->write(EQEMuLog::Debug, "OP CastSpell: slot=%d, spell=%d, target=%d, inv else spell_to_cast = SPELL_HARM_TOUCH2; p_timers.Start(pTimerHarmTouch, HarmTouchReuseTime); - } - - //handle disciplines, OLD, they keep changing this - if(castspell->slot == DISCIPLINE_SPELL_SLOT) { + } else if(castspell->slot == DISCIPLINE_SPELL_SLOT) { if(!UseDiscipline(castspell->spell_id, castspell->target_id)) { printf("Unknown ability being used by %s, spell being cast is: %i\n",GetName(),castspell->spell_id); InterruptSpell(castspell->spell_id); } return; - } - - if(castspell->slot < MAX_PP_MEMSPELL) - { + } else if(castspell->slot < MAX_PP_MEMSPELL) { spell_to_cast = m_pp.mem_spells[castspell->slot]; if(spell_to_cast != castspell->spell_id) { InterruptSpell(castspell->spell_id); //CHEATER!!! return; } + } else { + //If we get to here this slot should be invalid invalid + InterruptSpell(castspell->spell_id); + return; } - /* - these are coming through with slot 8 now... - else if(castspell->slot == 9) //discipline, LoH, HT, etc - { - if(GetClass() == PALADIN && castspell->spell_id == SPELL_LAY_ON_HANDS) - { - spell_to_cast = SPELL_LAY_ON_HANDS; - p_timers.Start(pTimerLayHands, LayOnHandsReuseTime); - CastSpell(spell_to_cast, castspell->target_id, castspell->slot); - } - else if(GetClass() == SHADOWKNIGHT - && (castspell->spell_id == SPELL_HARM_TOUCH || castspell->spell_id == SPELL_HARM_TOUCH2)) - { - if(GetLevel() < 40) - spell_to_cast = SPELL_HARM_TOUCH; - else - spell_to_cast = SPELL_HARM_TOUCH2; - p_timers.Start(pTimerHarmTouch, HarmTouchReuseTime); - } - else*/ - //try disciplines CastSpell(spell_to_cast, castspell->target_id, castspell->slot); } diff --git a/zone/common.h b/zone/common.h index ddc17118f..f7716c927 100644 --- a/zone/common.h +++ b/zone/common.h @@ -283,7 +283,7 @@ struct StatBonuses { int16 HundredHands; //extra haste, stacks with all other haste i int8 MeleeLifetap; //i int16 HealRate; // Spell effect that influences effectiveness of heals - int16 MaxHPChange; // Spell Effect + int32 MaxHPChange; // Spell Effect int16 SkillDmgTaken[HIGHEST_SKILL+2]; // All Skills + -1 int32 HealAmt; // Item Effect int32 SpellDmg; // Item Effect diff --git a/zone/merc.cpp b/zone/merc.cpp index 50cf6e270..e75efe8fe 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -918,7 +918,7 @@ int32 Merc::CalcMaxHP() { max_hp += GroupLeadershipAAHealthEnhancement(); - max_hp += max_hp * (spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000; + max_hp += max_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); if (cur_hp > max_hp) cur_hp = max_hp; diff --git a/zone/mob.cpp b/zone/mob.cpp index 0267d1279..6fec86369 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -615,7 +615,7 @@ int32 Mob::CalcMaxMana() { int32 Mob::CalcMaxHP() { max_hp = (base_hp + itembonuses.HP + spellbonuses.HP); - max_hp += max_hp * (aabonuses.MaxHPChange + spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000; + max_hp += max_hp * ((aabonuses.MaxHPChange + spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); return max_hp; } diff --git a/zone/mod_functions_base.cpp b/zone/mod_functions_base.cpp index 1fd0fdf47..8beb6cd79 100644 --- a/zone/mod_functions_base.cpp +++ b/zone/mod_functions_base.cpp @@ -184,4 +184,4 @@ int Mob::mod_spell_resist(int resist_chance, int level_mod, int resist_modifier, } //Spell is cast by this on spelltar, called from spellontarget after the event_cast_on NPC event -void Mob::mod_spell_cast(uint16 spell_id, Mob* spelltar, bool reflect, bool use_resist_adjust, int16 resist_adjust, bool isproc) { return; } \ No newline at end of file +void Mob::mod_spell_cast(uint16 spell_id, Mob* spelltar, bool reflect, bool use_resist_adjust, int16 resist_adjust, bool isproc) { return; }