1
This commit is contained in:
parent
649c3208a7
commit
c120fccab2
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "framework/cpp/msgqueue.h"
|
#include "framework/cpp/msgqueue.h"
|
||||||
#include "framework/cpp/tglog.h"
|
#include "framework/cpp/tglog.h"
|
||||||
|
#include "framework/cpp/utils.h"
|
||||||
|
|
||||||
struct MsgNode
|
struct MsgNode
|
||||||
{
|
{
|
||||||
@ -483,7 +484,25 @@ bool App::IsSeparateChannel(int channel)
|
|||||||
void App::LoadSeparateChannelConfig()
|
void App::LoadSeparateChannelConfig()
|
||||||
{
|
{
|
||||||
std::string data;
|
std::string data;
|
||||||
a8::ReadStringFromFile("../config/separate_channels.csv", data);
|
std::string filename = "../config/separate_channels.csv";
|
||||||
|
if (!f8::IsOnlineEnv()) {
|
||||||
|
if (f8::IsTestEnv()) {
|
||||||
|
filename = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver.test/separate_channels.csv",
|
||||||
|
{
|
||||||
|
GAME_ID,
|
||||||
|
App::Instance()->instance_id,
|
||||||
|
GAME_ID
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
filename = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver.dev/separate_channels.csv",
|
||||||
|
{
|
||||||
|
GAME_ID,
|
||||||
|
App::Instance()->instance_id,
|
||||||
|
GAME_ID
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
a8::ReadStringFromFile(filename, data);
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(data, strings, ',');
|
a8::Split(data, strings, ',');
|
||||||
separate_channel_hash_.clear();
|
separate_channel_hash_.clear();
|
||||||
@ -493,9 +512,10 @@ void App::LoadSeparateChannelConfig()
|
|||||||
separate_channel_hash_.insert(channel);
|
separate_channel_hash_.insert(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a8::UdpLog::Instance()->Info("LoadSeparateChannelConfig channelids:%s",
|
a8::UdpLog::Instance()->Debug("LoadSeparateChannelConfig %s channelids:%s",
|
||||||
{
|
{
|
||||||
GetSeparateChannelConfigData()
|
filename,
|
||||||
|
GetSeparateChannelConfigData()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user