游戏淘宝湾

 找回密码
 立即注册
开启左侧

[其他] 魔兽怪物的死亡效果不触发

[复制链接]
calmsolemn 发表于 2022-11-4 08:21:02 | 显示全部楼层 |阅读模式
uint32 Unit:ealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
             he->CombatStopWithPets(true);

             he->DuelComplete(DUEL_INTERUPTED);
         }

-        // battleground things (do this at the end, so the death state flag will be properly set to handle in the bg->handlekill)
-        if(pVictim->GetTypeId() == TYPEID_PLAYER && ((Player*)pVictim)->InBattleGround())

//杀怪获取MG
+if( (pVictim->GetTypeId() == TYPEID_UNIT) && player)
+{
+        //Creature *killed = ((Creature*)pVictim);
+
+        player->ModifyMG(3);//这句会让怪物的死亡效果不触发,就是假死,虽然死了,但是客户端显示的还是没死的样子
+        player->GetSession()->SendAreaTriggerMessage(_PrintfUTF8("获得MG %u",3));
+}


        uint32 GetMG() { return GetUInt32Value (PLAYER_MG); }
        void ModifyMG( int32 d )
        {
            if(d < 0)
                SetMG (GetMG() > uint32(-d) ? GetMG() + d : 0);
            else
                SetMG ( GetMG() + d );

        }
        void SetMG( uint32 value )
        {
            SetUInt32Value (PLAYER_MG, value);//PLAYER_MG是自己扩展的属性字段   
        }

本楼点评(0) 收起
hellophpcode 发表于 2022-11-4 09:28:24 | 显示全部楼层
淡定,淡定,淡定……
本楼点评(0) 收起
回复

使用道具 举报

kevin4488 发表于 2022-11-6 00:28:25 | 显示全部楼层
真是被感动的痛哭流涕……
本楼点评(0) 收起
回复

使用道具 举报

za402 发表于 2022-11-11 13:31:53 | 显示全部楼层
太生气了,无法HOLD啦 >_<......
本楼点评(0) 收起
回复

使用道具 举报

jerry1st 发表于 2022-11-12 20:58:12 | 显示全部楼层
太生气了,无法HOLD啦 >_<......
本楼点评(0) 收起
回复

使用道具 举报

mstester2011 发表于 2022-11-14 08:34:30 | 显示全部楼层
淡定,淡定,淡定……
本楼点评(0) 收起
回复

使用道具 举报

kuake2002 发表于 2022-11-16 07:35:06 | 显示全部楼层
太生气了,无法HOLD啦 >_<......
本楼点评(0) 收起
回复

使用道具 举报

xlz888 发表于 2022-11-17 18:12:09 | 显示全部楼层
真是难得给力的帖子啊。
本楼点评(0) 收起
回复

使用道具 举报

411129362 发表于 2022-11-18 10:44:44 | 显示全部楼层
楼主加油,我们都看好你哦。
本楼点评(0) 收起
回复

使用道具 举报

kissnan 发表于 2022-11-20 18:06:16 | 显示全部楼层
我只是路过打酱油的。
本楼点评(0) 收起
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|游戏淘宝湾

GMT+8, 2024-4-30 06:15 , Processed in 0.105605 second(s), 94 queries .

Powered by 游戏淘宝湾 X3.4

Copyright © 2001-2023, Oddpp Cloud.

快速回复 返回顶部 返回列表