PDA

View Full Version : allow to duel on map Core file edit >no need edit dbc file< (without dbc)



Wise
12-03-14, 12:46 AM
1-open file spellEffect.cpp
2- find this :

// Players can only fight a duel in zones with this flag
AreaTableEntry const* casterAreaEntry = GetAreaEntryByAreaID(caster->GetAreaId());
if (casterAreaEntry && !(casterAreaEntry->flags & AREA_FLAG_ALLOW_DUELS))
{

SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here
return;
}

AreaTableEntry const* targetAreaEntry = GetAreaEntryByAreaID(target->GetAreaId());
if (targetAreaEntry && !(targetAreaEntry->flags & AREA_FLAG_ALLOW_DUELS))
{
SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here
return;
}
3-edit to this

// Players can only fight a duel in zones with this flag
AreaTableEntry const* casterAreaEntry = GetAreaEntryByAreaID(caster->GetAreaId());
if(caster->GetAreaId() != 3217){ //3217 is dire maul PVP
if (casterAreaEntry && !(casterAreaEntry->flags & AREA_FLAG_ALLOW_DUELS))
{

SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here
return;
}}

AreaTableEntry const* targetAreaEntry = GetAreaEntryByAreaID(target->GetAreaId());
if(target->GetAreaId() != 3217){ //3217 is dire maul PVP
if (targetAreaEntry && !(targetAreaEntry->flags & AREA_FLAG_ALLOW_DUELS))
{
SendCastResult(SPELL_FAILED_NO_DUELING); // Dueling isn't allowed here
return;
}}
4-save and compile your source :))