mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 09:48:20 +00:00
Teams: Default team loot to ffa (#1224)
This commit is contained in:
parent
ba91058736
commit
3806891db0
@ -11,6 +11,7 @@
|
|||||||
#include "eConnectionType.h"
|
#include "eConnectionType.h"
|
||||||
#include "eChatInternalMessageType.h"
|
#include "eChatInternalMessageType.h"
|
||||||
#include "ChatPackets.h"
|
#include "ChatPackets.h"
|
||||||
|
#include "dConfig.h"
|
||||||
|
|
||||||
PlayerContainer::PlayerContainer() {
|
PlayerContainer::PlayerContainer() {
|
||||||
}
|
}
|
||||||
@ -19,6 +20,10 @@ PlayerContainer::~PlayerContainer() {
|
|||||||
mPlayers.clear();
|
mPlayers.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TeamData::TeamData() {
|
||||||
|
lootFlag = Game::config->GetValue("default_team_loot") == "0" ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
void PlayerContainer::InsertPlayer(Packet* packet) {
|
void PlayerContainer::InsertPlayer(Packet* packet) {
|
||||||
CINSTREAM_SKIP_HEADER;
|
CINSTREAM_SKIP_HEADER;
|
||||||
PlayerData* data = new PlayerData();
|
PlayerData* data = new PlayerData();
|
||||||
|
@ -18,6 +18,7 @@ struct PlayerData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TeamData {
|
struct TeamData {
|
||||||
|
TeamData();
|
||||||
LWOOBJID teamID = LWOOBJID_EMPTY; // Internal use
|
LWOOBJID teamID = LWOOBJID_EMPTY; // Internal use
|
||||||
LWOOBJID leaderID = LWOOBJID_EMPTY;
|
LWOOBJID leaderID = LWOOBJID_EMPTY;
|
||||||
std::vector<LWOOBJID> memberIDs{};
|
std::vector<LWOOBJID> memberIDs{};
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
#include "TeamManager.h"
|
#include "TeamManager.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
|
#include "Game.h"
|
||||||
|
#include "dConfig.h"
|
||||||
|
|
||||||
TeamManager* TeamManager::m_Address = nullptr; //For singleton method
|
TeamManager* TeamManager::m_Address = nullptr; //For singleton method
|
||||||
|
|
||||||
|
Team::Team() {
|
||||||
|
lootOption = Game::config->GetValue("default_team_loot") == "0" ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
TeamManager::TeamManager() {
|
TeamManager::TeamManager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,16 +2,15 @@
|
|||||||
|
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
|
|
||||||
struct Team
|
struct Team {
|
||||||
{
|
Team();
|
||||||
LWOOBJID teamID = LWOOBJID_EMPTY;
|
LWOOBJID teamID = LWOOBJID_EMPTY;
|
||||||
char lootOption = 0;
|
char lootOption = 0;
|
||||||
std::vector<LWOOBJID> members{};
|
std::vector<LWOOBJID> members{};
|
||||||
char lootRound = 0;
|
char lootRound = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TeamManager
|
class TeamManager {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
static TeamManager* Instance() {
|
static TeamManager* Instance() {
|
||||||
if (!m_Address) {
|
if (!m_Address) {
|
||||||
|
@ -43,3 +43,7 @@ maximum_mtu_size=1228
|
|||||||
# This cannot just be any arbitrary number. This has to match the same value that is in your client.
|
# This cannot just be any arbitrary number. This has to match the same value that is in your client.
|
||||||
# If you do not know what this value is, default it to 171022.
|
# If you do not know what this value is, default it to 171022.
|
||||||
client_net_version=171022
|
client_net_version=171022
|
||||||
|
|
||||||
|
# Turn to 0 to default teams to use the live accurate Shared Loot (0) by default as opposed to Free for All (1)
|
||||||
|
# This is used in both Chat and World servers.
|
||||||
|
default_team_loot=1
|
||||||
|
Loading…
Reference in New Issue
Block a user