//////////////////////////////////////////////////////////////////////////////
// This file is part of the Journey MMORPG client //
// Copyright © 2015-2016 Daniel Allendorf //
// //
// This program is free software: you can redistribute it and/or modify //
// it under the terms of the GNU Affero 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 Affero General Public License for more details. //
// //
// You should have received a copy of the GNU Affero General Public License //
// along with this program. If not, see . //
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include "MapleMap/MapObject.h"
#include "../Graphics/Animation.h"
#include "../Net/Login.h"
#include
#include
namespace jrc
{
class NpcSpawn
{
public:
NpcSpawn(int32_t oid,
int32_t npcid,
Point position,
bool mirrored,
uint16_t fh);
int32_t get_oid() const;
std::unique_ptr instantiate(const Physics& physics) const;
private:
int32_t oid;
int32_t id;
Point position;
bool flip;
uint16_t fh;
};
class MobSpawn
{
public:
MobSpawn(int32_t oid,
int32_t id,
int8_t mode,
int8_t stance,
uint16_t fh,
bool newspawn,
int8_t team,
Point position);
int8_t get_mode() const;
int32_t get_oid() const;
std::unique_ptr instantiate() const;
private:
int32_t oid;
int32_t id;
int8_t mode;
int8_t stance;
uint16_t fh;
bool newspawn;
int8_t team;
Point position;
};
class ReactorSpawn
{
public:
ReactorSpawn(int32_t oid,
int32_t rid,
int8_t state,
Point position);
int32_t get_oid() const;
std::unique_ptr instantiate(const Physics& physics) const;
private:
int32_t oid;
int32_t rid;
int8_t state;
Point position;
};
class DropSpawn
{
public:
DropSpawn(int32_t oid,
int32_t id,
bool meso,
int32_t owner,
Point position,
Point destination,
int8_t droptype,
int8_t mode,
bool playerdrop);
bool is_meso() const;
int32_t get_itemid() const;
int32_t get_oid() const;
std::unique_ptr instantiate(const Animation& icon) const;
std::unique_ptr instantiate(const Texture& icon) const;
private:
int32_t oid;
int32_t id;
bool meso;
int32_t owner;
Point start;
Point dest;
int8_t droptype;
int8_t mode;
bool playerdrop;
};
class CharSpawn
{
public:
CharSpawn(int32_t cid,
const LookEntry& look,
uint8_t level,
int16_t job,
const std::string& name,
int8_t stance,
Point position);
int32_t get_cid() const;
std::unique_ptr instantiate() const;
private:
int32_t cid;
uint8_t level;
int16_t job;
std::string name;
int8_t stance;
Point position;
LookEntry look;
};
}