Ir para conteúdo

Pokemon PDA XTIBIA


deglorio

Posts Recomendados

Esqueci de Mencionar o Error Rolback que aconteceu no TV System

- O Player1 Foi assistir o Player2 com fly 2 andares acima

- Quando o Player1 Logou-se Deu Error (MAP.H) no Executavel

- Agora fica a duvida no PDA o Motivo era esse Error e talves outros, mais o Motivo Principal de todo mundo Desistir do PDA é esse Error ae que causa no Executavel. Eu nao manjo de Programaçao mais sera que nao Pode ser Algum Script do PDA que esteja causando o Rolback (Error Map.h) das Sources ?

Link para o comentário
Compartilhar em outros sites

Esqueci de Mencionar o Error Rolback que aconteceu no TV System

- O Player1 Foi assistir o Player2 com fly 2 andares acima

- Quando o Player1 Logou-se Deu Error (MAP.H) no Executavel

- Agora fica a duvida no PDA o Motivo era esse Error e talves outros, mais o Motivo Principal de todo mundo Desistir do PDA é esse Error ae que causa no Executavel. Eu nao manjo de Programaçao mais sera que nao Pode ser Algum Script do PDA que esteja causando o Rolback (Error Map.h) das Sources ?

Vou dar uma revisada nos scripts do TV System quando chegar em casa, se não for neles então é nas sources mesmo... Editado por ElderZard
Link para o comentário
Compartilhar em outros sites

Intao eu Peguei as Sources do PokemonXP e estou tentando Ler algumas partes do Codigo Fonte do Map.h e Pequeno o Codigo e pela Logica eu entendi que dentro desse Codigo existe Algo sobre : Posição do Player / Tiles / Movimentação Açoes (Pelo Mapa do Client Tibia ao Clicar e Andar)

 

- Se alguem manja ae de C++ ajude nos Ler o Map.H:

 

////////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
////////////////////////////////////////////////////////////////////////
// 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 3 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, see .
////////////////////////////////////////////////////////////////////////

#ifndef __MAP__
#define __MAP__
#include "tools.h"

#include "fileloader.h"
#include "position.h"

#include "waypoints.h"
#include "tile.h"

class Creature;
class Player;
class Game;
class Tile;
class Map;

struct FindPathParams;
struct AStarNode
{
uint16_t x, y;
AStarNode* parent;
int32_t f, g, h;
};

using boost::shared_ptr;
#define MAP_MAX_LAYERS 16

#define MAX_NODES 512
#define GET_NODE_INDEX(a) (a - &nodes[0])

#define MAP_NORMALWALKCOST 10
#define MAP_DIAGONALWALKCOST 25

class AStarNodes
{
public:
AStarNodes();
virtual ~AStarNodes() {}

void openNode(AStarNode* node);
void closeNode(AStarNode* node);

uint32_t countOpenNodes();
uint32_t countClosedNodes();

AStarNode* getBestNode();
AStarNode* createOpenNode();
AStarNode* getNodeInList(uint16_t x, uint16_t y);

bool isInList(uint16_t x, uint16_t y);
int32_t getEstimatedDistance(uint16_t x, uint16_t y, uint16_t xGoal, uint16_t yGoal);

int32_t getMapWalkCost(const Creature* creature, AStarNode* node,
const Tile* neighbourTile, const Position& neighbourPos);
static int32_t getTileWalkCost(const Creature* creature, const Tile* tile);

private:
AStarNode nodes[MAX_NODES];

std::bitset openNodes;
uint32_t curNode;
};

template class lessPointer: public std::binary_function
{
public:
bool operator()(T*& t1, T*& t2) {return *t1 < *t2;}
};

#define FLOOR_BITS 3
#define FLOOR_SIZE (1 << FLOOR_BITS)
#define FLOOR_MASK (FLOOR_SIZE - 1)

struct Floor
{
Floor();
Tile* tiles[FLOOR_SIZE][FLOOR_SIZE];
};

class FrozenPathingConditionCall;
class QTreeLeafNode;

class QTreeNode
{
public:
QTreeNode();
virtual ~QTreeNode();

bool isLeaf() const {return m_isLeaf;}

QTreeLeafNode* getLeaf(uint16_t x, uint16_t y);
static QTreeLeafNode* getLeafStatic(QTreeNode* root, uint16_t x, uint16_t y);

QTreeLeafNode* createLeaf(uint16_t x, uint16_t y, uint16_t level);

protected:
bool m_isLeaf;
QTreeNode* m_child[4];

friend class Map;
};


class QTreeLeafNode : public QTreeNode
{
public:
QTreeLeafNode();
virtual ~QTreeLeafNode();

Floor* createFloor(uint16_t z);
Floor* getFloor(uint16_t z){return m_array[z];}

QTreeLeafNode* stepSouth(){return m_leafS;}
QTreeLeafNode* stepEast(){return m_leafE;}

void addCreature(Creature* c);
void removeCreature(Creature* c);

protected:
static bool newLeaf;

QTreeLeafNode* m_leafS;
QTreeLeafNode* m_leafE;

Floor* m_array[MAP_MAX_LAYERS];
CreatureVector creatureList;

friend class Map;
friend class QTreeNode;
};

/**
* Map class.
* Holds all the actual map-data
*/

class Map
{
public:
Map();
virtual ~Map() {}

static const int32_t maxViewportX = 11; //min value: maxClientViewportX + 1
static const int32_t maxViewportY = 11; //min value: maxClientViewportY + 1
static const int32_t maxClientViewportX = 8;
static const int32_t maxClientViewportY = 6;

/**
* Load a map.
* \returns true if the map was loaded successfully
*/
bool loadMap(const std::string& identifier);

/**
* Save a map.
* \param identifier file/database to save to
* \returns true if the map was saved successfully
*/
bool saveMap();

/**
* Get a single tile.
* \returns A pointer to that tile.
*/
Tile* getTile(int32_t x, int32_t y, int32_t z);
Tile* getTile(const Position& pos) {return getTile(pos.x, pos.y, pos.z);}

/**
* Set a single tile.
* \param a tile to set for the position
*/
void setTile(uint16_t _x, uint16_t _y, uint16_t _z, Tile* newTile);
void setTile(const Position& pos, Tile* newTile) {setTile(pos.x, pos.y, pos.z, newTile);}

/**
* Place a creature on the map
* \param pos The position to place the creature
* \param creature Creature to place on the map
* \param extendedPos If true, the creature will in first-hand be placed 2 tiles away
* \param forceLogin If true, placing the creature will not fail becase of obstacles (creatures/chests)
*/
bool placeCreature(const Position& centerPos, Creature* creature, bool extendedPos = false, bool forceLogin = false);

/**
* Remove a creature from the map.
* \param c Creature pointer to the creature to remove
*/
bool removeCreature(Creature* c);

/**
* Checks if you can throw an object to that position
* \param fromPos from Source point
* \param toPos Destination point
* \param rangex maximum allowed range horizontially
* \param rangey maximum allowed range vertically
* \param checkLineOfSight checks if there is any blocking objects in the way
* \returns The result if you can throw there or not
*/
bool canThrowObjectTo(const Position& fromPos, const Position& toPos, bool checkLineOfSight = true,
int32_t rangex = Map::maxClientViewportX, int32_t rangey = Map::maxClientViewportY);

/**
* Checks if path is clear from fromPos to toPos
* Notice: This only checks a straight line if the path is clear, for path finding use getPathTo.
* \param fromPos from Source point
* \param toPos Destination point
* \param floorCheck if true then view is not clear if fromPos.z is not the same as toPos.z
* \returns The result if there is no obstacles
*/
bool isSightClear(const Position& fromPos, const Position& toPos, bool floorCheck) const;
bool checkSightLine(const Position& fromPos, const Position& toPos) const;

/**
* Get the path to a specific position on the map.
* \param creature The creature that wants a path
* \param destPos The position we want a path calculated to
* \param listDir contains a list of directions to the destination
* \param maxDist Maximum distance from our current position to search, default: -1 (no limit)
* \returns returns true if a path was found
*/
bool getPathTo(const Creature* creature, const Position& destPos,
std::list& listDir, int32_t maxDist = -1);
bool getPathMatching(const Creature* creature, std::list& dirList,
const FrozenPathingConditionCall& pathCondition, const FindPathParams& fpp);

QTreeLeafNode* getLeaf(uint16_t x, uint16_t y) {return root.getLeaf(x, y);}
const Tile* canWalkTo(const Creature* creature, const Position& pos);
Waypoints waypoints;

protected:
QTreeNode root;

uint32_t mapWidth, mapHeight;
std::string spawnfile, housefile;
StringVec descriptions;

SpectatorCache spectatorCache;
void clearSpectatorCache() {spectatorCache.clear();}

// Actually scans the map for spectators
void getSpectatorsInternal(SpectatorVec& list, const Position& centerPos, bool checkforduplicate,
int32_t minRangeX, int32_t maxRangeX, int32_t minRangeY, int32_t maxRangeY,
int32_t minRangeZ, int32_t maxRangeZ);
// Use this when a custom spectator vector is needed, this support many
// more parameters than the heavily cached version below.
void getSpectators(SpectatorVec& list, const Position& centerPos, bool checkforduplicate = false, bool multifloor = false,
int32_t minRangeX = 0, int32_t maxRangeX = 0, int32_t minRangeY = 0, int32_t maxRangeY = 0);
// The returned SpectatorVec is a temporary and should not be kept around
// Take special heed in that the vector will be destroyed if any function
// that calls clearSpectatorCache is called.
const SpectatorVec& getSpectators(const Position& centerPos);

friend class Game;
friend class IOMap;
};

inline void QTreeLeafNode::addCreature(Creature* c)
{
creatureList.push_back©;
}

inline void QTreeLeafNode::removeCreature(Creature* c)
{
CreatureVector::iterator it = std::find(creatureList.begin(), creatureList.end(), c);
assert(it != creatureList.end());
creatureList.erase(it);
}
#endif

*,>

 

- Pode Ser Nada ver que estou falando mais pelo que eu entendi é isso

- Agora e So Caçar o Crash ou "Tentar Caçar"

- O Admin do Pokemiw me Disse que "Tiro o Crash" Removendo algumas Açoes de Tiles em data/moveevents/Tiles uma delas é o Tile de Gelo Snow.lua

- Tem que fazer tests com todos os Tiles que se encontra em data/moveevents

 

- O Crash da TV intao foi na Hora de eu Logar (Old Position) com o Player2 de Fly (Em baixo do Fly é Void)

- Sei la talves pode ser algum Tile ou a Posição do Player que Fica dando dor de cabeça para Nos no PDA ou Pode ser no Executavel mesmo (Sem Chances de Arrumar)

Link para o comentário
Compartilhar em outros sites

 

Intao eu Peguei as Sources do PokemonXP e estou tentando Ler algumas partes do Codigo Fonte do Map.h e Pequeno o Codigo e pela Logica eu entendi que dentro desse Codigo existe Algo sobre : Posição do Player / Tiles / Movimentação Açoes (Pelo Mapa do Client Tibia ao Clicar e Andar)

 

- Se alguem manja ae de C++ ajude nos Ler o Map.H:

 

////////////////////////////////////////////////////////////////////////

// OpenTibia - an opensource roleplaying game

////////////////////////////////////////////////////////////////////////

// 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 3 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, see .

////////////////////////////////////////////////////////////////////////

 

#ifndef __MAP__

#define __MAP__

#include "tools.h"

 

#include "fileloader.h"

#include "position.h"

 

#include "waypoints.h"

#include "tile.h"

 

class Creature;

class Player;

class Game;

class Tile;

class Map;

 

struct FindPathParams;

struct AStarNode

{

uint16_t x, y;

AStarNode* parent;

int32_t f, g, h;

};

 

using boost::shared_ptr;

#define MAP_MAX_LAYERS 16

 

#define MAX_NODES 512

#define GET_NODE_INDEX(a) (a - &nodes[0])

 

#define MAP_NORMALWALKCOST 10

#define MAP_DIAGONALWALKCOST 25

 

class AStarNodes

{

public:

AStarNodes();

virtual ~AStarNodes() {}

 

void openNode(AStarNode* node);

void closeNode(AStarNode* node);

 

uint32_t countOpenNodes();

uint32_t countClosedNodes();

 

AStarNode* getBestNode();

AStarNode* createOpenNode();

AStarNode* getNodeInList(uint16_t x, uint16_t y);

 

bool isInList(uint16_t x, uint16_t y);

int32_t getEstimatedDistance(uint16_t x, uint16_t y, uint16_t xGoal, uint16_t yGoal);

 

int32_t getMapWalkCost(const Creature* creature, AStarNode* node,

const Tile* neighbourTile, const Position& neighbourPos);

static int32_t getTileWalkCost(const Creature* creature, const Tile* tile);

 

private:

AStarNode nodes[MAX_NODES];

 

std::bitset openNodes;

uint32_t curNode;

};

 

template class lessPointer: public std::binary_function

{

public:

bool operator()(T*& t1, T*& t2) {return *t1 < *t2;}

};

 

#define FLOOR_BITS 3

#define FLOOR_SIZE (1 << FLOOR_BITS)

#define FLOOR_MASK (FLOOR_SIZE - 1)

 

struct Floor

{

Floor();

Tile* tiles[FLOOR_SIZE][FLOOR_SIZE];

};

 

class FrozenPathingConditionCall;

class QTreeLeafNode;

 

class QTreeNode

{

public:

QTreeNode();

virtual ~QTreeNode();

 

bool isLeaf() const {return m_isLeaf;}

 

QTreeLeafNode* getLeaf(uint16_t x, uint16_t y);

static QTreeLeafNode* getLeafStatic(QTreeNode* root, uint16_t x, uint16_t y);

 

QTreeLeafNode* createLeaf(uint16_t x, uint16_t y, uint16_t level);

 

protected:

bool m_isLeaf;

QTreeNode* m_child[4];

 

friend class Map;

};

 

 

class QTreeLeafNode : public QTreeNode

{

public:

QTreeLeafNode();

virtual ~QTreeLeafNode();

 

Floor* createFloor(uint16_t z);

Floor* getFloor(uint16_t z){return m_array[z];}

 

QTreeLeafNode* stepSouth(){return m_leafS;}

QTreeLeafNode* stepEast(){return m_leafE;}

 

void addCreature(Creature* c);

void removeCreature(Creature* c);

 

protected:

static bool newLeaf;

 

QTreeLeafNode* m_leafS;

QTreeLeafNode* m_leafE;

 

Floor* m_array[MAP_MAX_LAYERS];

CreatureVector creatureList;

 

friend class Map;

friend class QTreeNode;

};

 

/**

* Map class.

* Holds all the actual map-data

*/

 

class Map

{

public:

Map();

virtual ~Map() {}

 

static const int32_t maxViewportX = 11; //min value: maxClientViewportX + 1

static const int32_t maxViewportY = 11; //min value: maxClientViewportY + 1

static const int32_t maxClientViewportX = 8;

static const int32_t maxClientViewportY = 6;

 

/**

* Load a map.

* \returns true if the map was loaded successfully

*/

bool loadMap(const std::string& identifier);

 

/**

* Save a map.

* \param identifier file/database to save to

* \returns true if the map was saved successfully

*/

bool saveMap();

 

/**

* Get a single tile.

* \returns A pointer to that tile.

*/

Tile* getTile(int32_t x, int32_t y, int32_t z);

Tile* getTile(const Position& pos) {return getTile(pos.x, pos.y, pos.z);}

 

/**

* Set a single tile.

* \param a tile to set for the position

*/

void setTile(uint16_t _x, uint16_t _y, uint16_t _z, Tile* newTile);

void setTile(const Position& pos, Tile* newTile) {setTile(pos.x, pos.y, pos.z, newTile);}

 

/**

* Place a creature on the map

* \param pos The position to place the creature

* \param creature Creature to place on the map

* \param extendedPos If true, the creature will in first-hand be placed 2 tiles away

* \param forceLogin If true, placing the creature will not fail becase of obstacles (creatures/chests)

*/

bool placeCreature(const Position& centerPos, Creature* creature, bool extendedPos = false, bool forceLogin = false);

 

/**

* Remove a creature from the map.

* \param c Creature pointer to the creature to remove

*/

bool removeCreature(Creature* c);

 

/**

* Checks if you can throw an object to that position

* \param fromPos from Source point

* \param toPos Destination point

* \param rangex maximum allowed range horizontially

* \param rangey maximum allowed range vertically

* \param checkLineOfSight checks if there is any blocking objects in the way

* \returns The result if you can throw there or not

*/

bool canThrowObjectTo(const Position& fromPos, const Position& toPos, bool checkLineOfSight = true,

int32_t rangex = Map::maxClientViewportX, int32_t rangey = Map::maxClientViewportY);

 

/**

* Checks if path is clear from fromPos to toPos

* Notice: This only checks a straight line if the path is clear, for path finding use getPathTo.

* \param fromPos from Source point

* \param toPos Destination point

* \param floorCheck if true then view is not clear if fromPos.z is not the same as toPos.z

* \returns The result if there is no obstacles

*/

bool isSightClear(const Position& fromPos, const Position& toPos, bool floorCheck) const;

bool checkSightLine(const Position& fromPos, const Position& toPos) const;

 

/**

* Get the path to a specific position on the map.

* \param creature The creature that wants a path

* \param destPos The position we want a path calculated to

* \param listDir contains a list of directions to the destination

* \param maxDist Maximum distance from our current position to search, default: -1 (no limit)

* \returns returns true if a path was found

*/

bool getPathTo(const Creature* creature, const Position& destPos,

std::list& listDir, int32_t maxDist = -1);

bool getPathMatching(const Creature* creature, std::list& dirList,

const FrozenPathingConditionCall& pathCondition, const FindPathParams& fpp);

 

QTreeLeafNode* getLeaf(uint16_t x, uint16_t y) {return root.getLeaf(x, y);}

const Tile* canWalkTo(const Creature* creature, const Position& pos);

Waypoints waypoints;

 

protected:

QTreeNode root;

 

uint32_t mapWidth, mapHeight;

std::string spawnfile, housefile;

StringVec descriptions;

 

SpectatorCache spectatorCache;

void clearSpectatorCache() {spectatorCache.clear();}

 

// Actually scans the map for spectators

void getSpectatorsInternal(SpectatorVec& list, const Position& centerPos, bool checkforduplicate,

int32_t minRangeX, int32_t maxRangeX, int32_t minRangeY, int32_t maxRangeY,

int32_t minRangeZ, int32_t maxRangeZ);

// Use this when a custom spectator vector is needed, this support many

// more parameters than the heavily cached version below.

void getSpectators(SpectatorVec& list, const Position& centerPos, bool checkforduplicate = false, bool multifloor = false,

int32_t minRangeX = 0, int32_t maxRangeX = 0, int32_t minRangeY = 0, int32_t maxRangeY = 0);

// The returned SpectatorVec is a temporary and should not be kept around

// Take special heed in that the vector will be destroyed if any function

// that calls clearSpectatorCache is called.

const SpectatorVec& getSpectators(const Position& centerPos);

 

friend class Game;

friend class IOMap;

};

 

inline void QTreeLeafNode::addCreature(Creature* c)

{

creatureList.push_back©;

}

 

inline void QTreeLeafNode::removeCreature(Creature* c)

{

CreatureVector::iterator it = std::find(creatureList.begin(), creatureList.end(), c);

assert(it != creatureList.end());

creatureList.erase(it);

}

#endif

 

*,>

 

- Pode Ser Nada ver que estou falando mais pelo que eu entendi é isso

- Agora e So Caçar o Crash ou "Tentar Caçar"

- O Admin do Pokemiw me Disse que "Tiro o Crash" Removendo algumas Açoes de Tiles em data/moveevents/Tiles uma delas é o Tile de Gelo Snow.lua

- Tem que fazer tests com todos os Tiles que se encontra em data/moveevents

 

- O Crash da TV intao foi na Hora de eu Logar (Old Position) com o Player2 de Fly (Em baixo do Fly é Void)

- Sei la talves pode ser algum Tile ou a Posição do Player que Fica dando dor de cabeça para Nos no PDA ou Pode ser no Executavel mesmo (Sem Chances de Arrumar)

 

Se for no executável mesmo, nós podemos arrumar nesse servidor já que o Deglorio possui as sources, já passou da hora de esquecer o PDA e investir em um servidor com sources, creio eu que esse aqui seja o melhor para estarmos investindo :D
Link para o comentário
Compartilhar em outros sites

 

Intao eu Peguei as Sources do PokemonXP e estou tentando Ler algumas partes do Codigo Fonte do Map.h e Pequeno o Codigo e pela Logica eu entendi que dentro desse Codigo existe Algo sobre : Posição do Player / Tiles / Movimentação Açoes (Pelo Mapa do Client Tibia ao Clicar e Andar)

 

- Se alguem manja ae de C++ ajude nos Ler o Map.H:

 

////////////////////////////////////////////////////////////////////////

// OpenTibia - an opensource roleplaying game

////////////////////////////////////////////////////////////////////////

// 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 3 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, see .

////////////////////////////////////////////////////////////////////////

 

#ifndef __MAP__

#define __MAP__

#include "tools.h"

 

#include "fileloader.h"

#include "position.h"

 

#include "waypoints.h"

#include "tile.h"

 

class Creature;

class Player;

class Game;

class Tile;

class Map;

 

struct FindPathParams;

struct AStarNode

{

uint16_t x, y;

AStarNode* parent;

int32_t f, g, h;

};

 

using boost::shared_ptr;

#define MAP_MAX_LAYERS 16

 

#define MAX_NODES 512

#define GET_NODE_INDEX(a) (a - &nodes[0])

 

#define MAP_NORMALWALKCOST 10

#define MAP_DIAGONALWALKCOST 25

 

class AStarNodes

{

public:

AStarNodes();

virtual ~AStarNodes() {}

 

void openNode(AStarNode* node);

void closeNode(AStarNode* node);

 

uint32_t countOpenNodes();

uint32_t countClosedNodes();

 

AStarNode* getBestNode();

AStarNode* createOpenNode();

AStarNode* getNodeInList(uint16_t x, uint16_t y);

 

bool isInList(uint16_t x, uint16_t y);

int32_t getEstimatedDistance(uint16_t x, uint16_t y, uint16_t xGoal, uint16_t yGoal);

 

int32_t getMapWalkCost(const Creature* creature, AStarNode* node,

const Tile* neighbourTile, const Position& neighbourPos);

static int32_t getTileWalkCost(const Creature* creature, const Tile* tile);

 

private:

AStarNode nodes[MAX_NODES];

 

std::bitset openNodes;

uint32_t curNode;

};

 

template class lessPointer: public std::binary_function

{

public:

bool operator()(T*& t1, T*& t2) {return *t1 < *t2;}

};

 

#define FLOOR_BITS 3

#define FLOOR_SIZE (1 << FLOOR_BITS)

#define FLOOR_MASK (FLOOR_SIZE - 1)

 

struct Floor

{

Floor();

Tile* tiles[FLOOR_SIZE][FLOOR_SIZE];

};

 

class FrozenPathingConditionCall;

class QTreeLeafNode;

 

class QTreeNode

{

public:

QTreeNode();

virtual ~QTreeNode();

 

bool isLeaf() const {return m_isLeaf;}

 

QTreeLeafNode* getLeaf(uint16_t x, uint16_t y);

static QTreeLeafNode* getLeafStatic(QTreeNode* root, uint16_t x, uint16_t y);

 

QTreeLeafNode* createLeaf(uint16_t x, uint16_t y, uint16_t level);

 

protected:

bool m_isLeaf;

QTreeNode* m_child[4];

 

friend class Map;

};

 

 

class QTreeLeafNode : public QTreeNode

{

public:

QTreeLeafNode();

virtual ~QTreeLeafNode();

 

Floor* createFloor(uint16_t z);

Floor* getFloor(uint16_t z){return m_array[z];}

 

QTreeLeafNode* stepSouth(){return m_leafS;}

QTreeLeafNode* stepEast(){return m_leafE;}

 

void addCreature(Creature* c);

void removeCreature(Creature* c);

 

protected:

static bool newLeaf;

 

QTreeLeafNode* m_leafS;

QTreeLeafNode* m_leafE;

 

Floor* m_array[MAP_MAX_LAYERS];

CreatureVector creatureList;

 

friend class Map;

friend class QTreeNode;

};

 

/**

* Map class.

* Holds all the actual map-data

*/

 

class Map

{

public:

Map();

virtual ~Map() {}

 

static const int32_t maxViewportX = 11; //min value: maxClientViewportX + 1

static const int32_t maxViewportY = 11; //min value: maxClientViewportY + 1

static const int32_t maxClientViewportX = 8;

static const int32_t maxClientViewportY = 6;

 

/**

* Load a map.

* \returns true if the map was loaded successfully

*/

bool loadMap(const std::string& identifier);

 

/**

* Save a map.

* \param identifier file/database to save to

* \returns true if the map was saved successfully

*/

bool saveMap();

 

/**

* Get a single tile.

* \returns A pointer to that tile.

*/

Tile* getTile(int32_t x, int32_t y, int32_t z);

Tile* getTile(const Position& pos) {return getTile(pos.x, pos.y, pos.z);}

 

/**

* Set a single tile.

* \param a tile to set for the position

*/

void setTile(uint16_t _x, uint16_t _y, uint16_t _z, Tile* newTile);

void setTile(const Position& pos, Tile* newTile) {setTile(pos.x, pos.y, pos.z, newTile);}

 

/**

* Place a creature on the map

* \param pos The position to place the creature

* \param creature Creature to place on the map

* \param extendedPos If true, the creature will in first-hand be placed 2 tiles away

* \param forceLogin If true, placing the creature will not fail becase of obstacles (creatures/chests)

*/

bool placeCreature(const Position& centerPos, Creature* creature, bool extendedPos = false, bool forceLogin = false);

 

/**

* Remove a creature from the map.

* \param c Creature pointer to the creature to remove

*/

bool removeCreature(Creature* c);

 

/**

* Checks if you can throw an object to that position

* \param fromPos from Source point

* \param toPos Destination point

* \param rangex maximum allowed range horizontially

* \param rangey maximum allowed range vertically

* \param checkLineOfSight checks if there is any blocking objects in the way

* \returns The result if you can throw there or not

*/

bool canThrowObjectTo(const Position& fromPos, const Position& toPos, bool checkLineOfSight = true,

int32_t rangex = Map::maxClientViewportX, int32_t rangey = Map::maxClientViewportY);

 

/**

* Checks if path is clear from fromPos to toPos

* Notice: This only checks a straight line if the path is clear, for path finding use getPathTo.

* \param fromPos from Source point

* \param toPos Destination point

* \param floorCheck if true then view is not clear if fromPos.z is not the same as toPos.z

* \returns The result if there is no obstacles

*/

bool isSightClear(const Position& fromPos, const Position& toPos, bool floorCheck) const;

bool checkSightLine(const Position& fromPos, const Position& toPos) const;

 

/**

* Get the path to a specific position on the map.

* \param creature The creature that wants a path

* \param destPos The position we want a path calculated to

* \param listDir contains a list of directions to the destination

* \param maxDist Maximum distance from our current position to search, default: -1 (no limit)

* \returns returns true if a path was found

*/

bool getPathTo(const Creature* creature, const Position& destPos,

std::list& listDir, int32_t maxDist = -1);

bool getPathMatching(const Creature* creature, std::list& dirList,

const FrozenPathingConditionCall& pathCondition, const FindPathParams& fpp);

 

QTreeLeafNode* getLeaf(uint16_t x, uint16_t y) {return root.getLeaf(x, y);}

const Tile* canWalkTo(const Creature* creature, const Position& pos);

Waypoints waypoints;

 

protected:

QTreeNode root;

 

uint32_t mapWidth, mapHeight;

std::string spawnfile, housefile;

StringVec descriptions;

 

SpectatorCache spectatorCache;

void clearSpectatorCache() {spectatorCache.clear();}

 

// Actually scans the map for spectators

void getSpectatorsInternal(SpectatorVec& list, const Position& centerPos, bool checkforduplicate,

int32_t minRangeX, int32_t maxRangeX, int32_t minRangeY, int32_t maxRangeY,

int32_t minRangeZ, int32_t maxRangeZ);

// Use this when a custom spectator vector is needed, this support many

// more parameters than the heavily cached version below.

void getSpectators(SpectatorVec& list, const Position& centerPos, bool checkforduplicate = false, bool multifloor = false,

int32_t minRangeX = 0, int32_t maxRangeX = 0, int32_t minRangeY = 0, int32_t maxRangeY = 0);

// The returned SpectatorVec is a temporary and should not be kept around

// Take special heed in that the vector will be destroyed if any function

// that calls clearSpectatorCache is called.

const SpectatorVec& getSpectators(const Position& centerPos);

 

friend class Game;

friend class IOMap;

};

 

inline void QTreeLeafNode::addCreature(Creature* c)

{

creatureList.push_back©;

}

 

inline void QTreeLeafNode::removeCreature(Creature* c)

{

CreatureVector::iterator it = std::find(creatureList.begin(), creatureList.end(), c);

assert(it != creatureList.end());

creatureList.erase(it);

}

#endif

 

*,>

 

- Pode Ser Nada ver que estou falando mais pelo que eu entendi é isso

- Agora e So Caçar o Crash ou "Tentar Caçar"

- O Admin do Pokemiw me Disse que "Tiro o Crash" Removendo algumas Açoes de Tiles em data/moveevents/Tiles uma delas é o Tile de Gelo Snow.lua

- Tem que fazer tests com todos os Tiles que se encontra em data/moveevents

 

- O Crash da TV intao foi na Hora de eu Logar (Old Position) com o Player2 de Fly (Em baixo do Fly é Void)

- Sei la talves pode ser algum Tile ou a Posição do Player que Fica dando dor de cabeça para Nos no PDA ou Pode ser no Executavel mesmo (Sem Chances de Arrumar)

 

Você ta usando a TV depois que eu utilizei o servidor dia 30/12/2015?

Link para o comentário
Compartilhar em outros sites

Você ta usando a TV depois que eu utilizei o servidor dia 30/12/2015?

Nao Deglorio e que eu Mencionei o nome do Error que aconteceu antes de voce atualizar o Servidor. Que e o mesmo Error que acontece nos PDAS (Map.h) ai veio a duvida de como Pode Acontecer esse ERROR no PDA!

Link para o comentário
Compartilhar em outros sites

- Pra quem nao Sabe ele atualizo o Server Dia 30/12 Como:

 

- Mod First Itens Funcionando Perfeitamente (Stack Itens c++ estava dando Conflito)

- Nick System Atualizado

- TV System

- Loot

 

- Obs: Agora da Para abrir o Servidor em Sqlite sem Problemas e ir arrumando os Bugs

Feliz Ano Novo

Link para o comentário
Compartilhar em outros sites

- Pra quem nao Sabe ele atualizo o Server Dia 30/12 Como:

 

- Mod First Itens Funcionando Perfeitamente (Stack Itens c++ estava dando Conflito)

- Nick System Atualizado

- TV System

- Loot

 

- Obs: Agora da Para abrir o Servidor em Sqlite sem Problemas e ir arrumando os Bugs

Feliz Ano Novo

Percebi ! Vou adicionar sistemas básicos e ajudar ele !
Link para o comentário
Compartilhar em outros sites

- Pra quem nao Sabe ele atualizo o Server Dia 30/12 Como:

 

- Mod First Itens Funcionando Perfeitamente (Stack Itens c++ estava dando Conflito)

- Nick System Atualizado

- TV System

- Loot

 

- Obs: Agora da Para abrir o Servidor em Sqlite sem Problemas e ir arrumando os Bugs

Feliz Ano Novo

Next eu acabei de baixar o server e o first item da itens ao player toda vez q loga, testei somente com god nao sei se tem problema mais acho q deveria ser normal, e a tv ainda esta bugada, o player que esta gravando se deslogar, o player que esta assistindo ainda continua vendo o player que estava grando, e é teleportado para onde o player q estava gravando estava.

Link para o comentário
Compartilhar em outros sites

Next eu acabei de baixar o server e o first item da itens ao player toda vez q loga, testei somente com god nao sei se tem problema mais acho q deveria ser normal, e a tv ainda esta bugada, o player que esta gravando se deslogar, o player que esta assistindo ainda continua vendo o player que estava grando, e é teleportado para onde o player q estava gravando estava.

- Troca o Mod First Itens que funciona

- Nao era esse Bug da TV que estava falando ... e um que tava dando crash na hora de logar

- O Bug da tv que esta acontecendo e uma Storage que ao logar nao esta tirando

- Eu mandei msg pra ele no Face e no Zap pra saber qual o numero dessa Storage ate agora ele nao respondeu ele fica pouco tempo no PC

Link para o comentário
Compartilhar em outros sites

intao ja tentei todas as storages ja

- Tipo eu percebi uma Coisa....

- Quando acontece esse Bug e o Player que ligo a Camera fexa o Canal de TV para de Acontecer esse Bug

- a Função é function onLeaveChannel(cid, channelId, users) que fica em data/creaturescripts/tv2.lua

- So Que eu ja tentei ultilizar a storage que tem dentro dessa função e setar para -1 mesmo assim o bug continua

- Vou verificar se existe mais storages aki se nao achar a storage ela deve estar nas Sources

- Eu ja vou sair Se alguem conseguir arrumar o Bug da TV manda aki no post

Link para o comentário
Compartilhar em outros sites

Ja Adicionei todas novas sprites de pxg, algumas do otpokemon e, algumas criadas pelo meu spriter


Ja Adicionei sprites novas do pxg, algumas do otpokemon, remakes, e sprites novas do meu spriter,

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...