public virtual IBuffEffect CreateBuffEffect(int effectID) { if (m_parent != null) { return(m_parent.CreateBuffEffect(effectID)); } IBuffEffect eff = m_resultPool.GetObjectFromPool(effectID) as IBuffEffect; if (eff != null) { return(eff); } IBuffEffectFactory f = null; if (m_effectFactory.TryGetValue(effectID, out f)) { return(f()); } return(null); }