吾爱尚玩资源基地
标题:
最新的T端335魔兽世界跨阵营战场系统代码!
[打印本页]
作者:
admin
时间:
2016-5-4 22:51
标题:
最新的T端335魔兽世界跨阵营战场系统代码!
魔兽怀旧WOTLK巫妖王的跨阵营战场系统代码!希望大家喜欢!
1、支持TrinityCore的335版本最新!目前最新吧
2、就是跨阵营的战场系统!可以互跨阵营来战场战斗!
3、喜欢的怀旧WOTLK的朋友可以试试这个代码!
部分代码看看!!
-void Battleground::RewardReputationToTeam(uint32 faction_id, uint32 Reputation, uint32 TeamID)
+void Battleground::RewardReputationToTeam(uint32 a_faction_id, uint32 h_faction_id, uint32 Reputation, uint32 teamId)
{
- if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id))
- for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
- if (Player* player = _GetPlayerForTeam(TeamID, itr, "RewardReputationToTeam"))
- player->GetReputationMgr().ModifyReputation(factionEntry, Reputation);
+ FactionEntry const* a_factionEntry = sFactionStore.LookupEntry(a_faction_id);
+ FactionEntry const* h_factionEntry = sFactionStore.LookupEntry(h_faction_id);
+
+ if (!a_factionEntry || !h_factionEntry)
+ return;
+
+ for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ {
+ if (itr->second.OfflineRemoveTime)
+ continue;
+
+ Player* plr = ObjectAccessor::FindPlayer(itr->first);
+
+ if (!plr)
+ {
+ TC_LOG_ERROR("bg.battleground", "BattleGround:RewardReputationToTeam: %u not found!", itr->first);
+ continue;
+ }
+
+ uint32 team = plr->GetTeam();
+
+ if (team == teamId)
+ plr->GetReputationMgr().ModifyReputation(plr->GetOTeam() == ALLIANCE ? a_factionEntry : h_factionEntry, Reputation);
+ }
}
完整代码下载
作者:
神级丶
时间:
2021-9-23 00:29
RE: 最新的T端335魔兽世界跨阵营战场系统代码
作者:
blaze_et
时间:
2022-1-4 05:05
最新的T端335魔兽世界跨阵营战场系统代码!
作者:
2254070395
时间:
2022-1-12 15:21
感谢分享!!!!!
作者:
showway
时间:
2023-1-9 15:55
先看一下,孙菲菲偾阿斯蒂芬
作者:
juzzpig
时间:
2023-9-26 18:03
感谢分享,跨阵营族战场太有用了
作者:
twt
时间:
2023-10-4 09:36
魔兽世界3.35智能机器人战歌战场版
欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/)
Powered by Discuz! X3.4