Esempio n. 1
0
        public void createHero(Variant m)
        {
            int     @int    = m["mid"]._int;
            uint    @uint   = m["iid"]._uint;
            Variant conf    = MonsterConfig.instance.conf;
            Variant variant = conf["monsters"][string.Concat(@int)];
            bool    flag    = variant == null;

            if (flag)
            {
                GameTools.PrintError(" hero[ " + @int + " ] no conf ERR!");
            }
            else
            {
                LGAvatarHero lGAvatarHero = new LGAvatarHero(this.g_mgr);
                this._heros[@uint] = lGAvatarHero;
                bool flag2 = m["owner_cid"] == ModelBase <PlayerModel> .getInstance().cid;

                if (flag2)
                {
                    lGAvatarHero.addEffect("heroenterworld" + this.herologhtIdx, "hero_enterscence", true);
                }
                lGAvatarHero.initData(m);
                lGAvatarHero.init();
                this.g_mgr.g_processM.addRender(lGAvatarHero, false);
            }
        }
Esempio n. 2
0
        public void createHero(Variant m)
        {
            int  heroid = m["mid"]._int;
            uint iid    = m["iid"]._uint;


            Variant b     = MonsterConfig.instance.conf;
            Variant mconf = b["monsters"][heroid + ""];

            if (mconf == null)
            {
                GameTools.PrintError(" hero[ " + heroid + " ] no conf ERR!");
                return;
            }

            LGAvatarHero ct = new LGAvatarHero(this.g_mgr);

            _heros[iid] = ct;

            if (m["owner_cid"] == PlayerModel.getInstance().cid)
            {
                ct.addEffect("heroenterworld" + herologhtIdx, "hero_enterscence", true);
            }

            ct.initData(m);
            ct.init();



            this.g_mgr.g_processM.addRender(ct);
        }