Piotrek1447
Member
Refresh, please help.
Compiler: Default compiler
Building Makefile: "C:\Dokumente und Einstellungen\Mathias\Desktop\Kopie von forgottenserver\Makefile.win"
Führt make clean aus
rm -f account.o actions.o admin.o allocator.o ban.o baseevents.o chat.o combat.o commands.o condition.o configmanager.o connection.o container.o creature.o creatureevent.o cylinder.o database.o databasemysql.o databasesqlite.o depot.o exception.o fileloader.o game.o gui.o house.o housetile.o inputbox.o ioguild.o iologindata.o iomap.o iomapserialize.o item.o items.o logger.o luascript.o mailbox.o map.o md5.o monster.o monsters.o movement.o networkmessage.o npc.o otserv.o outfit.o outputmessage.o party.o player.o playerbox.o position.o protocol80.o protocol.o protocollogin.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o spawn.o spells.o status.o talkaction.o tasks.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o vocation.o waitlist.o weapons.o pvparena.o Sinteria_Console_private.res SinteriaCON.exe
g++.exe -c account.cpp -o account.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
g++.exe -c actions.cpp -o actions.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from player.h:25,
from actions.cpp:24:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c admin.cpp -o admin.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from player.h:25,
from admin.h:80,
from admin.cpp:22:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c allocator.cpp -o allocator.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
g++.exe -c ban.cpp -o ban.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from player.h:25,
from ban.h:26,
from ban.cpp:24:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c baseevents.cpp -o baseevents.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
g++.exe -c chat.cpp -o chat.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from player.h:25,
from chat.cpp:23:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c combat.cpp -o combat.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from map.h:31,
from combat.h:27,
from combat.cpp:22:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c commands.cpp -o commands.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from commands.h:27,
from commands.cpp:26:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c condition.cpp -o condition.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from map.h:31,
from game.h:28,
from condition.cpp:23:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c configmanager.cpp -o configmanager.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
g++.exe -c connection.cpp -o connection.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from protocol80.h:29,
from connection.cpp:25:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c container.cpp -o container.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from map.h:31,
from iomap.h:25,
from container.cpp:23:
pvparena.h:39:23: warning: no newline at end of file
g++.exe -c creature.cpp -o creature.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/others/lua-5.1/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__RULEVIOLATIONREPORTS__ -D__CONSOLE__ -D__COMBAT_ZONES__ -D__PVP_ARENA__
In file included from tile.h:30,
from creature.h:31,
from creature.cpp:22:
pvparena.h:39:23: warning: no newline at end of file
creature.cpp: In member function `virtual void Creature::onDeath()':
creature.cpp:473: error: `creature' undeclared (first use this function)
creature.cpp:473: error: (Each undeclared identifier is reported only once for each function it appears in.)
make.exe: *** [creature.o] Error 1
Ausführung beendet
H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\game.cpp In member function `void Game::changeSkull(Player*, Skulls_t)':
3943 H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\game.cpp 'class Tile' has no member named 'hasFlags'
H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\game.cpp In member function `bool Game::loadCombatZones()':
4481 H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\game.cpp `doc' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\Makefile.win [Build Error] [game.o] Error 1
fixed the first error, typo .Well Im Gettin This Errors
Code:H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\game.cpp In member function `void Game::changeSkull(Player*, Skulls_t)': 3943 H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\game.cpp 'class Tile' has no member named 'hasFlags' H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\game.cpp In member function `bool Game::loadCombatZones()': 4481 H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\game.cpp `doc' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) H:\Documents and Settings\Administrator\Desktop\Source\forgottenserver\Makefile.win [Build Error] [game.o] Error 1
./creature.cpp: In member function `virtual void Creature:nDeath()':
./creature.cpp:468: error: `creature' undeclared (first use this function)
./creature.cpp:468: error: (Each undeclared identifier is reported only once for each function it appears in.)
make.exe: ** [./creature.o] Error 1
If i want to compile this i get this error.
I'm use TFS 0.28
./game.cpp In member function `bool Game::loadCombatZones()':
Line 4366 ./game.cpp `DATA_DIRECTORY' is not a member of `ConfigManager'
Makefile.win [Build Error] [game.o] Error 1
xmlDocPtr doc = xmlParseFile("data/XML/pvpzones.xml");
TFS is missing some config stuff then. Stupid TFS... just replace g_config.getString(ConfigManager:ATA_DIRECTORY) with std::string("data")Now i get a another error
Again, he posted in the wrong thread like a fool.change it to something like this line: xmlDocPtr doc = xmlParseFile("data/XML/pvpzones.xml");
PVP Zone not Arena?!?!
do as I said above.I've i replace
I get this error.
if(getMaster())
getMaster()->removeSummon(this);
#ifdef __PVP_ARENA__ //Modified by Elf
Tile* tile = getTile();
if(tile->pvparena)
{
if(hasMaster())
getMaster()->removeSummon(this);
}
else
{
#endif //__PVP_ARENA__
if(getMaster())
getMaster()->removeSummon(this);
#ifdef __PVP_ARENA__ //Modified by Elf
}
#endif //__PVP_ARENA__
g_game.removeCreature(this, false);
#ifdef __PVP_ARENA__ //Modified by Elf
if(tile->pvparena)
{
tile->pvparena->removeCreature(this, true);
}
else
{
#endif //__PVP_ARENA__
g_game.removeCreature(this, false);
#ifdef __PVP_ARENA__ //Modified by Elf
}
#endif //__PVP_ARENA__
int32_t newStackPos = creature->getParent()->__getIndexOfThing(creature);
creature->getParent()->postAddNotification(creature, newStackPos);
#ifdef __PVP_ARENA__
if(PvPArena* pvparena = creature->getTile()->pvparena)
{
pvparena->addCreature(creature, true);
}
#endif //__PVP_ARENA__
if(getWorldType() == WORLD_TYPE_PVP_ENFORCED)
return;
#ifdef __PVP_ARENA__
if(player->getTile()->hasFlag(TILESTATE_NOSKULLS) || getWorldType() == WORLD_TYPE_PVP_ENFORCED)
return;
#else
if(getWorldType() == WORLD_TYPE_PVP_ENFORCED)
return;
#endif //__PVP_ARENA__
ReturnValue Tile::__queryAdd(int32_t index, const Thing* thing, uint32_t count,
uint32_t flags) const
{
#ifdef __PVP_ARENA__
if(pvparena)
{
if(!pvparena->canAdd(thing))
return RET_NOTPOSSIBLE;
}
#endif //__PVP_ARENA__
void Tile::__addThing(int32_t index, Thing* thing)
{
Creature* creature = thing->getCreature();
if(creature){
#ifdef __PVP_ARENA__
if(pvparena != creature->getParent()->getTile()->pvparena)
{
if(pvparena)
pvparena->addCreature(creature);
if(PvPArena* p = creature->getParent()->getTile()->pvparena)
p->removeCreature(creature, false);
}
#endif //__PVP_ARENA__
class Creature;
class Teleport;
class TrashHolder;
class Mailbox;
class MagicField;
class BedItem;
#ifdef __PVP_ARENA__
#include "pvparena.h"
class PvPArena;
#endif //__PVP_ARENA__
Code:
#ifdef __PVP_ZONES__
,
TILESTATE_PVPENFORCEDZONE = [color=red]XXX[/color]
#endif //__PVP_ZONES__
#ifdef __PVP_ARENA__
,
TILESTATE_NOSKULLS = [color=blue]YYY[/color]
#endif //__PVP_ARENA__
thingCount = 0;
m_flags = 0;
ground = NULL;
#ifdef __PVP_ARENA__
pvparena = NULL;
#endif //__PVP_ARENA__
Item* ground;
ItemVector topItems;
CreatureVector creatures;
ItemVector downItems;
#ifdef __PVP_ARENA__
PvPArena* pvparena;
#endif //__PVP_ARENA__
if(!Combat::isInPvpZone(this, targetPlayer) &&
!targetPlayer->hasAttacked(this) &&
targetPlayer->getSkull() == SKULL_NONE)
{
if(!Combat::isInPvpZone(this, targetPlayer) &&
!targetPlayer->hasAttacked(this) &&
targetPlayer->getSkull() == SKULL_NONE
#ifdef __PVP_ARENA__
&& !getTile()->hasFlag(TILESTATE_NOSKULLS)
#endif //__PVP_ARENA__
)
{
#ifdef __PVP_ZONES__
std::cout << ">> Loading PVP zones" << std::endl;
#ifndef __CONSOLE__
SendMessage(gui.statusBar, WM_SETTEXT, 0, (LPARAM)">> Loading PVP zones");
#endif
g_game.loadCombatZones();
#endif //__PVP_ZONES__
#ifdef __PVP_ARENA__
std::cout << ">> Loading PVP arenas" << std::endl;
#ifndef __CONSOLE__
SendMessage(gui.statusBar, WM_SETTEXT, 0, (LPARAM)">> Loading PVP arenas");
#endif
PvPArena::loadArenas();
#endif //__PVP_ARENA__
//////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
//////////////////////////////////////////////////////////////////////
// otserv main. The only place where things get instantiated.
//////////////////////////////////////////////////////////////////////
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////////////////////////////////////////////
#ifdef __PVP_ARENA__
#include "pvparena.h"
#include "player.h"
#include "configmanager.h"
extern ConfigManager g_config;
#include "game.h"
extern Game g_game;
#include "tools.h"
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
PvPArena::PvPArena()
{
exitPos = Position(0, 0, 7);
flags = 0;
arenaMembers.clear();
}
PvPArena::~PvPArena()
{
arenaMembers.clear();
}
bool PvPArena::canAdd(const Thing* thing)
{
if(!thing)
return false;
if(const Creature* creature = thing->getCreature())
{
if(!creature->isAttackable())
return true;
if(flags & ARENA_FLAG_NOSUMMONS && creature->getMonster() != NULL)
return false;
else if(!(flags & ARENA_FLAG_MULTICOMBAT) && arenaMembers.size() > 2 && creature->getPlayer())
{
std::list<Creature*>::iterator cit = std::find(arenaMembers.begin(), arenaMembers.end(), creature);
if(cit == arenaMembers.end())
return false;
}
}
else if(const Item* item = thing->getItem())
{
if(!(flags & ARENA_FLAG_NO_FIELDS) && item->isMagicField())
return false;
}
return true;
}
bool PvPArena::loadArenas()
{
//system("PAUSE");
std::string filename = "data/XML/pvparenas.xml";
xmlDocPtr doc = xmlParseFile(filename.c_str());
if(!doc)
return false;
xmlNodePtr root, arenanode, tilenode;
root = xmlDocGetRootElement(doc);
if(xmlStrcmp(root->name,(const xmlChar*)"pvparenas") != 0){
xmlFreeDoc(doc);
return false;
}
arenanode = root->children;
while (arenanode){
if(xmlStrcmp(arenanode->name,(const xmlChar*)"pvparena") == 0)
{
PvPArena* newArena = new PvPArena();
int x, y, z;
if(readXMLInteger(arenanode,"exitx",x) &&
readXMLInteger(arenanode,"exity",y) &&
readXMLInteger(arenanode,"exitz",z))
{
newArena->exitPos = Position(x, y, z);
}
else
{
puts("ERROR: Missing/incomplete exit pos for pvparena! Skipping...");
delete newArena;
arenanode = arenanode->next;
continue;
}
std::string strValue;
int intValue;
if(readXMLString(arenanode,"allowsummons",strValue) && strValue == "no")
newArena->flags |= ARENA_FLAG_NOSUMMONS;
if(readXMLString(arenanode,"multi-combat",strValue) && strValue == "yes")
newArena->flags |= ARENA_FLAG_MULTICOMBAT;
if(readXMLString(arenanode,"allowfields",strValue) && strValue == "no")
newArena->flags |= ARENA_FLAG_NO_FIELDS;
tilenode = arenanode->children;
while(tilenode)
{
if(xmlStrcmp(tilenode->name,(const xmlChar*)"tiles") == 0)
{
int tox, toy, toz;
int fromx, fromy, fromz;
if(readXMLInteger(tilenode,"tox",tox) &&
readXMLInteger(tilenode,"toy",toy) &&
readXMLInteger(tilenode,"toz",toz) &&
readXMLInteger(tilenode,"fromx",fromx) &&
readXMLInteger(tilenode,"fromy",fromy) &&
readXMLInteger(tilenode,"fromz",fromz))
{
if(tox < fromx)
std::swap(tox, fromx);
if(toy < fromy)
std::swap(toy, fromy);
if(toz < fromz)
std::swap(toz, fromz);
for(int dx = fromx; dx <= tox; dx++)
{
for(int dy = fromy; dy <= toy; dy++)
{
for(int dz = fromz; dz <= toz; dz++)
{
if(Tile* t = g_game.getTile(dx, dy, dz))
{
t->pvparena = newArena;
t->setFlag(TILESTATE_PVPZONE);
t->setFlag(TILESTATE_NOSKULLS);
}
}
}
}
}
else
puts("ERROR: incomplete tile range! Skipping...");
}
tilenode = tilenode->next;
}
}
arenanode = arenanode->next;
}
xmlFreeDoc(doc);
return true;
}
void PvPArena::removeCreature(Creature* cr, bool death)
{
if(!cr)
return;
if(!cr->isAttackable())
return;
std::list<Creature*>::iterator cit = std::find(arenaMembers.begin(), arenaMembers.end(), cr);
if(cit != arenaMembers.end())
arenaMembers.erase(cit);
if(death)
{
if(Player* pr = cr->getPlayer())
{
if(g_game.internalTeleport(cr, exitPos, false) == RET_NOERROR)
g_game.addMagicEffect(exitPos, NM_ME_ENERGY_AREA);
pr->changeHealth(pr->getMaxHealth());
}
else
{
g_game.removeCreature(cr);
}
}
}
void PvPArena::addCreature(Creature* cr, bool isLogin)
{
if(!cr)
return;
if(!cr->isAttackable())
return;
// cant login on a pvp arena
if(isLogin && cr->getPlayer())
{
if(g_game.internalTeleport(cr, cr->getMasterPos(), false) == RET_NOERROR)
{
g_game.addMagicEffect(cr->getMasterPos(), NM_ME_ENERGY_AREA);
return;
}
}
arenaMembers.push_back(cr);
}
#endif //__PVP_ARENA__
//////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
//////////////////////////////////////////////////////////////////////
// otserv main. The only place where things get instantiated.
//////////////////////////////////////////////////////////////////////
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////////////////////////////////////////////
#ifdef __PVP_ARENA__
#ifndef __PVP_ARENA_H__
#define __PVP_ARENA_H__
#include "tile.h"
#include "position.h"
#include <list>
enum PvPArenaFlags_t
{
ARENA_FLAG_NONE = 0,
ARENA_FLAG_NOSUMMONS = 2,
ARENA_FLAG_MULTICOMBAT = 4,
ARENA_FLAG_NO_FIELDS = 8,
};
class PvPArena
{
public:
PvPArena();
~PvPArena();
int flags;
Position exitPos;
virtual bool canAdd(const Thing*);
std::list<Creature*> arenaMembers;
static bool loadArenas();
void removeCreature(Creature* cr, bool death = false);
void addCreature(Creature* cr, bool isLogin = false);
};
#endif //__PVP_ARENA_H__
#endif //__PVP_ARENA__
creature.cpp `hasMaster' was not declared in this scope
Find [in changeSkull function]:
Code:
if(getWorldType() == WORLD_TYPE_PVP_ENFORCED)
return;
replace it with:
Code:
#ifdef __PVP_ARENA__
if(player->getTile()->hasFlag(TILESTATE_NOSKULLS) || getWorldType() == WORLD_TYPE_PVP_ENFORCED)
return;
#else
if(getWorldType() == WORLD_TYPE_PVP_ENFORCED)
return;
#endif //__PVP_ARENA__