就是战场战斗的时候,你可以选择不同的阵营进行战斗!
不能支持所有的魔兽世界私服战场的战斗,但是大部分都可以支持!
从代码来看!可以进行战场改名,这样你的朋友就不会认识你了!这样就可以无所顾忌的战斗!
从下面的代码看来!战场中的语言也会随之而改变!
bool Player::SendBattleGroundChat(uint32 msgtype, std::string message)
{
// Select distance to broadcast to.
float distance = msgtype == CHAT_MSG_SAY ? sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY) : sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_YELL);
if (Battleground* pBattleGround = GetBattleground())
{
if (pBattleGround->isArena()) // Only fake chat in BG's. CFBG should not interfere with arenas.
return false;
for (Battleground::BattlegroundPlayerMap::const_iterator itr = pBattleGround->GetPlayers().begin(); itr != pBattleGround->GetPlayers().end(); ++itr)
{
if (Player* pPlayer = ObjectAccessor::FindPlayer(itr->first))
{
if (GetDistance2d(pPlayer->GetPositionX(), pPlayer->GetPositionY()) <= distance)
{
WorldPacket data(SMSG_MESSAGECHAT, 200);
if (GetTeam() == pPlayer->GetTeam())
BuildPlayerChat(&data, msgtype, message, LANG_UNIVERSAL);
else if (msgtype != CHAT_MSG_EMOTE)
BuildPlayerChat(&data, msgtype, message, pPlayer->GetTeam() == ALLIANCE ? LANG_ORCISH : LANG_COMMON);
pPlayer->GetSession()->SendPacket(&data);
}
}
}
return true;
}
else
return false;
}
还有就是应该人物的模型也需要修改!不然。就会被你的朋友认出来!多尴尬~~~~
void Player::SetFakeRaceAndMorph()
{
if (getClass() == CLASS_DRUID)
{
if (GetOTeam() == ALLIANCE)
{
m_FakeMorph = getGender() == GENDER_MALE ? FAKE_M_TAUREN : FAKE_F_TAUREN;
m_FakeRace = RACE_TAUREN;
}
else if (getGender() == GENDER_MALE) // HORDE PLAYER, ONLY HAVE MALE NELF ID
{
m_FakeMorph = FAKE_M_NELF;
m_FakeRace = RACE_NIGHTELF;
}
else
m_FakeRace = GetOTeam() == ALLIANCE ? RACE_BLOODELF : RACE_HUMAN;
}
else if (getClass() == CLASS_SHAMAN && GetOTeam() == HORDE && getGender() == GENDER_FEMALE)
{
m_FakeMorph = FAKE_F_DRANAEI; // Female Draenei
m_FakeRace = RACE_DRAENEI;
}
else
{
m_FakeRace = GetOTeam() == ALLIANCE ? RACE_BLOODELF : RACE_HUMAN;
if (GetOTeam() == HORDE)
{
if (getGender() == GENDER_MALE)
m_FakeMorph = 19723;
else
m_FakeMorph = 19724;
}
else
{
if (getGender() == GENDER_MALE)
m_FakeMorph = 20578;
else
m_FakeMorph = 20579;
}
}
}
完整代码下载
|