OK論壇

 找回密碼
 註冊
查看: 1302|回復: 0

[分享] recallmapplayer

[複製鏈接]
  • TA的每日心情
    開心
    2011-6-25 01:53 PM
  • 簽到天數: 10 天

    連續簽到: 0 天

    [LV.3]偶爾看看II

    發表於 2011-6-13 00:10:47 | 顯示全部樓層 |閱讀模式
    1. ACMD_FUNC(recallmapplayer)
    2. {
    3. struct map_session_data* pl_sd;
    4. struct s_mapiterator* iter;

    5. nullpo_retr(-1, sd);
    6. memset(atcmd_output, '\0', sizeof(atcmd_output));

    7. if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
    8. clif_displaymessage(fd, "你没有足够的能力在这张地图内召唤玩家");
    9. return -1;
    10. }

    11. iter = mapit_getallusers();
    12. while( (pl_sd = (TBL_PC*)mapit_next(iter)) != NULL ) {
    13. if (sd->status.account_id != pl_sd->status.account_id && pc_isGM(sd) >= pc_isGM(pl_sd))
    14. {
    15. if (pc_isGM(pl_sd) > pc_isGM(sd))
    16. continue;
    17. if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd))
    18. continue;
    19. if (pc_isdead(pl_sd)) { //针对死亡的玩家,直接复活他
    20. pc_setstand(pl_sd);
    21. pc_setrestartvalue(pl_sd,1);
    22. }
    23. pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
    24. }
    25. }
    26. mapit_free(iter);

    27. clif_displaymessage(fd, "成功召唤当前地图玩家!");
    28. return 0;
    29. }
    複製代碼
    回復

    使用道具 舉報

    您需要登錄後才可以回帖 登錄 | 註冊

    本版積分規則

    Archiver|手機版|小黑屋|OK討論區

    GMT+8, 2024-5-6 11:26 PM , Processed in 0.088798 second(s), 19 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回復 返回頂部 返回列表