private bool TotemSelect(int indexTotem, TotemId spellId) { string sLua; _totemBar[indexTotem] = spellId; // Shaman.Dlog("Totem Bar: called with #{0} to '{1}'", indexTotem, sSpell); if (!SpellManager.HasSpell("Call of the Elements")) { return(false); } if (spellId == 0) { Shaman.Dlog("Totem Bar: removing slot #{0}", indexTotem); sLua = String.Format("SetMultiCastSpell({0})", 132 + indexTotem); Shaman.RunLUA(sLua); return(true); } if (!HasTotemSpell(spellId)) { Shaman.Dlog("Totem Bar: cannot set slot #{0} to unknown spell id '{1}'", indexTotem, spellId); return(false); } sLua = String.Format("SetMultiCastSpell({0}, {1})", 132 + indexTotem, (int)spellId); Shaman.RunLUA(sLua); return(true); }
private void TotemDestroy(int indexTotem) { Shaman.RunLUA("DestroyTotem(" + indexTotem + ")"); _totem[indexTotem] = null; }