Propper lightwell handling

I figured out the blizz logic behind lightwell today, unfortunately the server I made it for is a PvP only server, thus it has very limited use for me.
I hope anyone else has more use for it.
— a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -2042,6 +2042,7 @@
mask = UNIT_MASK_GUARDIAN;
break;
case SUMMON_TYPE_TOTEM:

  •                case SUMMON_TYPE_LIGHTWELL:
                       mask = UNIT_MASK_TOTEM;
                       break;
                   case SUMMON_TYPE_VEHICLE:
    

— a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -2719,7 +2719,7 @@
SUMMON_TYPE_WILD3 = 8,
SUMMON_TYPE_VEHICLE = 9,
SUMMON_TYPE_VEHICLE2 = 10,

  • SUMMON_TYPE_OBJECT = 11,
  • SUMMON_TYPE_LIGHTWELL = 11,
    };

enum EventId

— a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -3123,6 +3123,8 @@
if (m_originalCaster)
summon = m_caster->GetMap()->SummonCreature(entry, pos, properties, duration, m_originalCaster);
break;

  •            case SUMMON_TYPE_LIGHTWELL:
    
  •                damage = m_caster->CountPctFromMaxHealth(50); // this is unconfirmed
               case SUMMON_TYPE_TOTEM:
               {
                   summon = m_caster->GetMap()->SummonCreature(entry, pos, properties, duration, m_originalCaster, m_spellInfo->Id);
    

Things to note:

  1. The health is unconfirmed, i couldn’t find anything on the subject.
  2. The client classifies lightwell as a totem(without this patch) picture.
  3. SUMMON_TYPE_OBJECT is only used by lightwell summoning spells, and therefore it should be SUMMON_TYPE_LIGHTWELL.
  4. Making lightwell a totem makes it unattackable by aoe/dots/pushbacks as it should be
  5. Saying thanks really means alot

I’m not sure about this

eleborate

pretty nice, I would like to hear if it would actually work though /emoticons/default_wink.png

ServerToClient: SMSG_CREATURE_QUERY_RESPONSE (0x0061) Length: 104 ConnectionIndex: 0 Time: 03/03/2010 05:35:25.000 Number: 456108

Entry: 31897

[0] Name: Lightwell

[1] Name:

[2] Name:

[3] Name:

Sub Name:

Icon Name: Interact

Type Flags: DoNotLogDeath (1024)

Type: Totem (11)

Family: None (0)

Rank: Normal (0)

Kill Credit 1: 0

Kill Credit 2: 0

[0] Display ID: 27769

[1] Display ID: 0

[2] Display ID: 0

[3] Display ID: 0

Modifier 1: 1

Modifier 2: 1

Racial Leader: False

[0] Quest Item: 0

[1] Quest Item: 0

[2] Quest Item: 0

[3] Quest Item: 0

[4] Quest Item: 0

[5] Quest Item: 0

Movement ID: 0

Can you elaborate?

What is there to elaborate?

Entry: 31897[0] Name: Lightwell

Icon Name: Interact

Type Flags: DoNotLogDeath (1024)

Type: Totem (11)

[0] Display ID: 27769