mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 21:08:03 +00:00
Dungeon Crawl custom code merge
Added numerous modding hooks. Added rules: Character:KeepLevelOverMax - Don't delevel a character if they are found to be over max level rule. Spells:UseCHAScribeHack - Optionally omit spells with CHA in effect12 when using scribespells and traindiscs Combat:MonkACBonusWeight - Adjust the weight threshold for monk AC bonus Combat:ClientStunLevel - Adjust the level clients kicks and bashes start to roll for stuns Combat;QuiverWRHasteDiv - Adjust the divisor applied to weight reduction for haste calcs Combat:UseArcheryBonusRoll - Make archery stationary bonus a roll Combat:ArcheryBonusChance - Archery stationary bonus chance Added account flags and associated perl wrappers Added EVENT_ITEM_TICK for interactive items Added EVENT_DUEL_WIN and EVENT_DUEL_LOSE, which exports $enemyname and $enemyid Added timer and interval to console worldshutdown command Added EQW interface for worldshutdown and server-wide messages
This commit is contained in:
@@ -2076,6 +2076,30 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
//DCBOOKMARK
|
||||
int r;
|
||||
bool tryaug = false;
|
||||
ItemInst* clickaug = 0;
|
||||
Item_Struct* augitem = 0;
|
||||
|
||||
for(r = 0; r < MAX_AUGMENT_SLOTS; r++) {
|
||||
const ItemInst* aug_i = inst->GetAugment(r);
|
||||
if(!aug_i)
|
||||
continue;
|
||||
const Item_Struct* aug = aug_i->GetItem();
|
||||
if(!aug)
|
||||
continue;
|
||||
|
||||
if ( (aug->Click.Type == ET_ClickEffect) || (aug->Click.Type == ET_Expendable) || (aug->Click.Type == ET_EquipClick) || (aug->Click.Type == ET_ClickEffect2) )
|
||||
{
|
||||
tryaug = true;
|
||||
clickaug = (ItemInst*)aug_i;
|
||||
augitem = (Item_Struct*)aug;
|
||||
spell_id = aug->Click.Effect;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if((spell_id <= 0) && (item->ItemType != ItemTypeFood && item->ItemType != ItemTypeDrink && item->ItemType != ItemTypeAlcohol && item->ItemType != ItemTypeSpell))
|
||||
{
|
||||
LogFile->write(EQEMuLog::Debug, "Item with no effect right clicked by %s",GetName());
|
||||
@@ -2123,6 +2147,39 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (tryaug) //DCBOOKMARK
|
||||
{
|
||||
if (clickaug->GetCharges() == 0)
|
||||
{
|
||||
//Message(0, "This item is out of charges.");
|
||||
Message_StringID(13, ITEM_OUT_OF_CHARGES);
|
||||
return;
|
||||
}
|
||||
if(GetLevel() >= augitem->Click.Level2)
|
||||
{
|
||||
if(parse->ItemHasQuestSub(clickaug, "EVENT_ITEM_CLICK_CAST"))
|
||||
{
|
||||
//TODO: need to enforce and set recast timers here because the spell may not be cast.
|
||||
parse->EventItem(EVENT_ITEM_CLICK_CAST, this, clickaug, clickaug->GetID(), slot_id);
|
||||
inst = m_inv[slot_id];
|
||||
if (!inst)
|
||||
{
|
||||
// Item was deleted by the perl event
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//We assume augs aren't consumable
|
||||
CastSpell(augitem->Click.Effect, target_id, 10, augitem->CastTime, 0, 0, slot_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(13, ITEMS_INSUFFICIENT_LEVEL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(GetClientVersion() >= EQClientSoD && !inst->IsEquipable(GetBaseRace(),GetClass()))
|
||||
@@ -2605,6 +2662,9 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app)
|
||||
con->faction = FACTION_DUBIOUS;
|
||||
}
|
||||
|
||||
//DCBOOKMARK
|
||||
mod_consider(tmob, con);
|
||||
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
@@ -3200,6 +3260,9 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
|
||||
|
||||
if((response).size() > 0)
|
||||
{
|
||||
//DCBOOKMARK
|
||||
if( !mod_saylink(response, silentsaylink) ) { return; }
|
||||
|
||||
if(this->GetTarget() && this->GetTarget()->IsNPC())
|
||||
{
|
||||
if(silentsaylink)
|
||||
@@ -7714,7 +7777,12 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
|
||||
SetHP(GetHP() - damage);
|
||||
|
||||
if(GetHP() <= 0)
|
||||
{
|
||||
//DCBOOKMARK
|
||||
mod_client_death_env();
|
||||
|
||||
Death(0, 32000, SPELL_UNKNOWN, HAND_TO_HAND);
|
||||
}
|
||||
SendHPUpdate();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user