AprendizM2 Posted August 23, 2018 at 01:14 AM Share Posted August 23, 2018 at 01:14 AM Bom, por padrão os npcs usam a bandeira dos reinos, criei uma nova bandeira para os npcs, onde posso alterar? Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted August 23, 2018 at 01:39 AM Share Posted August 23, 2018 at 01:39 AM Binario em: void CInstanceBase::__AttachEmpireEffect (DWORD eEmpire) __EffectContainer_AttachEffect (EFFECT_EMPIRE + eEmpire); Ai adiciona o empire (deverás ter o efeito EFFECT_EMPIRE no teu cliente). Depois terás de adicionar um if antes a verificar se é ou não um npc Ou então onde está: __AttachEmpireEffect (c_rkCreateData.m_dwEmpireID); Adicionas um if, usando a primeira função que referi como exemplo e crias apenas para os npc: Algo como (em pseudo codigo): If IsNPC(){ __AttachNpcEffect() } else { __AttachEmpireEffect (c_rkCreateData.m_dwEmpireID); } No cliente tens isto a carregar os efeitos: chrmgr.RegisterEffect(chrmgr.EFFECT_EMPIRE+1, "Bip01", "d:/ymir work/effect/etc/empire/empire_A.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_EMPIRE+2, "Bip01", "d:/ymir work/effect/etc/empire/empire_B.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_EMPIRE+3, "Bip01", "d:/ymir work/effect/etc/empire/empire_C.mse") A maneira mais simples a meu ver, seria criar isto assim: chrmgr.RegisterEffect(chrmgr.EFFECT_EMPIRE+4, "Bip01", "d:/ymir work/effect/etc/empire/npc.mse") E depois na source onde diz: __AttachEmpireEffect (c_rkCreateData.m_dwEmpireID); Fazer uma verificação. Se fosse um NPC, fazia: __AttachEmpireEffect (4); Caso contrário fazia: __AttachEmpireEffect (c_rkCreateData.m_dwEmpireID); Na prática estarias a criar um efeito para um novo 4º reino inexistente, e atribuindo esse efeito a cada npc. 1 Link to comment Share on other sites More sharing options...
AprendizM2 Posted August 23, 2018 at 01:47 AM Author Share Posted August 23, 2018 at 01:47 AM 8 minutes ago, Tierri Lopes said: Binario em: void CInstanceBase::__AttachEmpireEffect (DWORD eEmpire) __EffectContainer_AttachEffect (EFFECT_EMPIRE + eEmpire); Ai adiciona o empire (deverás ter o efeito EFFECT_EMPIRE no teu cliente). Depois terás de adicionar um if antes a verificar se é ou não um npc Ou então onde está: __AttachEmpireEffect (c_rkCreateData.m_dwEmpireID); Adicionas um if, usando a primeira função que referi como exemplo e crias apenas para os npc: Algo como (em pseudo codigo): If IsNPC(){ __AttachNpcEffect() } else { __AttachEmpireEffect (c_rkCreateData.m_dwEmpireID); } No cliente tens isto a carregar os efeitos: chrmgr.RegisterEffect(chrmgr.EFFECT_EMPIRE+1, "Bip01", "d:/ymir work/effect/etc/empire/empire_A.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_EMPIRE+2, "Bip01", "d:/ymir work/effect/etc/empire/empire_B.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_EMPIRE+3, "Bip01", "d:/ymir work/effect/etc/empire/empire_C.mse") A maneira mais simples a meu ver, seria criar isto assim: chrmgr.RegisterEffect(chrmgr.EFFECT_EMPIRE+4, "Bip01", "d:/ymir work/effect/etc/empire/npc.mse") E depois na source onde diz: __AttachEmpireEffect (c_rkCreateData.m_dwEmpireID); Fazer uma verificação. Se fosse um NPC, fazia: __AttachEmpireEffect (4); Caso contrário fazia: __AttachEmpireEffect (c_rkCreateData.m_dwEmpireID); Na prática estarias a criar um efeito para um novo 4º reino inexistente, e atribuindo esse efeito a cada npc. obrrigado, irei testar 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now