wuduz游戏站

 找回密码
 注册
搜索
无度传奇145z游戏站745v奇迹网
查看: 1571|回复: 0
打印 上一主题 下一主题

[技术教程] 魔兽怪物的死亡效果不触发

跳转到指定楼层
楼主
发表于 2022-10-16 14:00:57 |只看该作者 |正序浏览
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是自己扩展的属性字段   
        }

使用道具 举报

手机版|sitemap|txt|wuduz游戏站

GMT+8, 2026-6-11 01:18

回顶部