Jump to content

Identifier Not Found


Guest henhouse

Recommended Posts

In SpellEffects.cpp I'm trying to edit the line:

    AreaTableEntry const* targetAreaEntry = GetAreaEntryByAreaID(target->GetZoneId());
   if(targetAreaEntry && (targetAreaEntry->flags & AREA_FLAG_CAPITAL ))
   {
       SendCastResult(SPELL_FAILED_NO_DUELING);            // Dueling isn't allowed here
       return;
   }

and change that line to:

if(targetAreaEntry && (targetAreaEntry->flags & AREA_FLAG_CAPITAL || (GetAreaId() == 2317) || (GetZoneId() == 3817)) )

So that those areas will basically have disabled dueling. Now, the C++ might be wrong, I've tried a few other ways, I'm very new with all this stuff anyway, but I always get the error:

..\\..\\src\\game\\SpellEffects.cpp(4972) : error C3861: 'GetAreaId': identifier not found

..\\..\\src\\game\\SpellEffects.cpp(4972) : error C3861: 'GetZoneId': identifier not found

So I thought I needed to include some resource file, so I tried stuff like including Map.h, MapManager.h, etc, etc and none of them get rid of this error. So I have a feeling I'm doing something completely wrong :S.

Link to comment
Share on other sites

=/ got this back:

..\\..\\src\\game\\SpellEffects.cpp(4925) : error C2065: 'targetAreaEntry' : undeclared identifier
..\\..\\src\\game\\SpellEffects.cpp(4925) : error C2227: left of '->flags' must point to class/struct/union/generic type
       type is ''unknown-type''
..\\..\\src\\game\\SpellEffects.cpp(4925) : error C3861: 'GetAreaId': identifier not found
..\\..\\src\\game\\SpellEffects.cpp(4925) : error C3861: 'GetZoneId': identifier not found

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use