Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-15-2002, 11:35 AM
neotokyo
Hill Giant
 
Join Date: Oct 2002
Posts: 118
Default Fix: Lifetaps

add this function somewhere in the attack.cpp

Quote:
// neotokyo 14-Nov-02
// Helperfunction to check for Lifetaps
bool IsLifetapSpell(int16 spell_id)
{
// filter out invalid spell_ids
if (spell_id <= 0 || spell_id >= 0xffff)
return false;

// if database says its a tap, i am sure its right
if (spells[spell_id].targettype == ST_Tap)
return true;

// now check some additional lifetaps just to make sure
// i.e. lifebane isnt recognized since type == target not tap
switch(spell_id)
{
case 1613:
case 341:
case 445:
case 502:
case 447:
case 525:
case 2115: // Ancient: Lifebane
case 446:
case 524:
case 1618:
case 1393: // Gangrenous touch of zu'muul
case 1735: // trucidation
return true;
}
return false;
}
add this snippet of code into the same file, into function
"NPC:Damage" just before the check for Death (1st return in the function) and after the "was hit by non melee" message.

Quote:
// if spell is lifetap add hp to the caster
if (other && IsLifetapSpell( spell_id ))
{
int32 healedhp;

// check if healing would be greater than max hp
// use temp var to store actual healing value
if ( other->GetHP() + damage > other->GetMaxHP())
{
healedhp = other->GetMaxHP() - other->GetHP();
other->SetHP(other->GetMaxHP());
}
else
{
healedhp = damage;
other->SetHP(other->GetHP() + damage);
}

// not sure if i need to send this or not. didnt hurt yet though ;-)
APPLAYER hp_app;
other->CreateHPPacket(&hp_app);

// if client was casting the spell there need to be some messages
if (other->IsClient())
{
other->CastToClient()->Message(4,"You have been healed for %d points of damage.", healedhp);
other->CastToClient()->QueuePacket(&hp_app);
}

// emote goes with every one ... even npcs
entity_list.MessageClose(this, true, 300, MT_Emote, "%s beams a smile at %s", other->GetName(), this->GetName() );
entity_list.QueueCloseClients(this, &hp_app, false, 600, other);
}
and remove these lines of code in the same function -> obsolete
Quote:
else if (attack_skill == 0x231)
{
if (spell_id != 0xFFFF && spell_id != 0)
{
if (spells[spell_id].targettype == ST_Tap)
{
other->SetHP(GetHP() + damage);
}
}
}
this doesnt cover PVP yet (i guess - couldnt test it cause no one joined my test server ;-) just normal Player vs Mobs Combat, but should include lifetap procs

have fun...
Reply With Quote
  #2  
Old 11-15-2002, 12:19 PM
quester
Hill Giant
 
Join Date: Oct 2002
Posts: 108
Default

AWESOME!

This is one of those areas I really wanted to see working, but had enough on my plate as it is lol.

How about lookign at the hp-to-mana spells now

Does this mod cover lifetap over time spells, like leach, etc?
Reply With Quote
  #3  
Old 11-16-2002, 03:18 AM
neotokyo
Hill Giant
 
Join Date: Oct 2002
Posts: 118
Default tap-dots

since verant decided to do the dot-taps quite differently the answer to your question is: No.

but dont panic. the lifetaps-over-time are working if you implemented the Recourse-Spell-Fix i posted a few days back.
Reply With Quote
  #4  
Old 11-16-2002, 03:32 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Hmm.. Havent rolled that one into my changes..

Neo, how about downloading my changed files from the other thread and rolling your changes for recourse and what not into them and reattatching it to the thread..
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #5  
Old 11-16-2002, 04:02 AM
neotokyo
Hill Giant
 
Join Date: Oct 2002
Posts: 118
Default

do i need webspace for this?
if yes - any reliable free webspace provider around?
Reply With Quote
  #6  
Old 11-16-2002, 04:28 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Naa, you can just attach it through your browser when paste a message, use the attatch button underneath your reply..

Just add .txt to the file extension..

Like so..
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:28 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3