当前位置:首页>>魔兽单机>>正文
魔兽单机端MANGOS-TBC 决斗PVP后胜利获得金币
2013-03-30 12:49:32 作者:fiver 来源: 浏览次数:0
摘要:魔兽单机端MANGOS-TBC 决斗PVP后胜利获得金币
 diff -Nuar oregoncore-current/src/game/Player.cpp oregoncore-pq/src/game/Player.cpp
--- oregoncore-current/src/game/Player.cpp 2011-01-01 10:03:08.000000000 -0500
+++ oregoncore-pq/src/game/Player.cpp 2011-01-01 10:12:59.000000000 -0500
@@ -6829,6 +6829,30 @@
     if (uint32 amount = sWorld.getConfig(CONFIG_HONOR_AFTER_DUEL))
         duel->opponent->RewardHonor(NULL,1,amount);
 
+    // Gold after duel (the winner) - ImpConfig
+    if(uint32 amount = sWorld.getConfig(CONFIG_GOLD_AFTER_DUEL))
+    {
+        int copper = amount * 10000;
+        // set string varables
+        int buffer;
+        char const *duelwincstr;
+        char const *duelosecstr;
+        std::stringstream ss;
+        // create chat message
+        ss << "You receive " << amount << " Gold for conquering " << GetName() << " in a duel!";
+        // convert string to const chr
+        std::string duelwinstr = ss.str();
+        duelwincstr = duelwinstr.c_str();
+        // give player gold
+        duel->opponent->ModifyMoney(copper);
+        // send chat message
+        ChatHandler(duel->opponent).SendSysMessage(duelwincstr);
+    }
+
     //cleanups
     SetUInt64Value(PLAYER_DUEL_ARBITER, 0);
     SetUInt32Value(PLAYER_DUEL_TEAM, 0);
diff -Nuar oregoncore-current/src/game/World.cpp oregoncore-pq/src/game/World.cpp
--- oregoncore-current/src/game/World.cpp 2011-01-01 10:03:08.000000000 -0500
+++ oregoncore-pq/src/game/World.cpp 2011-01-01 10:12:59.000000000 -0500
@@ -1087,6 +1087,9 @@
     m_configs[CONFIG_HONOR_AFTER_DUEL] = sConfig.GetIntDefault("HonorPointsAfterDuel", 0);
     if (m_configs[CONFIG_HONOR_AFTER_DUEL] < 0)
         m_configs[CONFIG_HONOR_AFTER_DUEL]= 0;
+    m_configs[CONFIG_GOLD_AFTER_DUEL] = sConfig.GetIntDefault("GoldAfterDuel", 0);
+    if(m_configs[CONFIG_GOLD_AFTER_DUEL] < 0)
+        m_configs[CONFIG_GOLD_AFTER_DUEL]= 0;
     m_configs[CONFIG_START_ALL_EXPLORED] = sConfig.GetBoolDefault("PlayerStart.MapsExplored", false);
     m_configs[CONFIG_START_ALL_REP] = sConfig.GetBoolDefault("PlayerStart.AllReputation", false);
     m_configs[CONFIG_ALWAYS_MAXSKILL] = sConfig.GetBoolDefault("AlwaysMaxWeaponSkill", false);
diff -Nuar oregoncore-current/src/game/World.h oregoncore-pq/src/game/World.h
--- oregoncore-current/src/game/World.h 2011-01-01 10:03:08.000000000 -0500
+++ oregoncore-pq/src/game/World.h 2011-01-01 10:12:59.000000000 -0500
@@ -215,6 +215,7 @@
     CONFIG_BG_START_MUSIC,
     CONFIG_START_ALL_SPELLS,
     CONFIG_HONOR_AFTER_DUEL,
+    CONFIG_GOLD_AFTER_DUEL,
     CONFIG_START_ALL_EXPLORED,
     CONFIG_START_ALL_REP,
     CONFIG_ALWAYS_MAXSKILL,
diff -Nuar oregoncore-current/src/oregoncore/oregoncore.conf.dist oregoncore-pq/src/oregoncore/oregoncore.conf.dist
--- oregoncore-current/src/oregoncore/oregoncore.conf.dist 2011-01-01 10:03:08.000000000 -0500
+++ oregoncore-pq/src/oregoncore/oregoncore.conf.dist 2011-01-01 10:12:59.000000000 -0500
@@ -1914,6 +1914,10 @@
 #        The amount of honor points the duel winner will get after a duel.
 #        Default: 0 - disable
 #
+#    GoldAfterDuel
+#        The base amount, in gold, to award the winner of a duel.
+#        Default: 0 - disable
+#
 #    AlwaysMaxWeaponSkill
 #        Players will automatically gain max weapon/defense skill when
 #         logging in, leveling up etc.
@@ -1988,6 +1992,7 @@
 PlayerStart.MapsExplored = 0
 MusicInBattleground = 0
 HonorPointsAfterDuel = 0
+GoldAfterDuel = 0
 AlwaysMaxWeaponSkill = 0
 PvPToken.Enable = 0
 PvPToken.MapAllowType = 4


点击下载完整代码
 


相关报道:

[关闭] [返回顶部]


  返回首页 | 最新资讯 | 资源下载 | 魔兽图片 | 单机文档 | 技术攻略 | 玩家视频
备案号:蜀ICP备2024062380号-1
免责声明:本网站为热爱怀旧WOW的玩家们建立的魔兽世界资料网站,仅供交流和学习使用,非盈利和商用.如有侵权之处,请联系我们,我们会在24小时内确认删除侵权内容,谢谢合作。
Copyright © 2024 - 2024 WOWAII.COM Corporation, All Rights Reserved

机器人国度