Exemple #1
0
 public static uint GetPartyNumberPlayersLUA(PartyEnums.PartyType partyType = PartyEnums.PartyType.LE_PARTY_CATEGORY_HOME)
 {
     try
     {
         string randomStringResult = Others.GetRandomString(Others.Random(4, 10));
         Lua.LuaDoString(randomStringResult + " = GetNumGroupMembers(\"" + partyType + "\");");
         string sResult = Lua.GetLocalizedText(randomStringResult);
         return(Others.ToUInt32(sResult));
     }
     catch (Exception e)
     {
         Logging.WriteError("Party > GetPartyNumberPlayers(): " + e);
     }
     return(0);
 }
Exemple #2
0
 public static bool IsInGroupLUA(PartyEnums.PartyType partyType = PartyEnums.PartyType.LE_PARTY_CATEGORY_HOME)
 {
     try
     {
         string randomStringResult  = Others.GetRandomString(Others.Random(4, 10));
         string randomStringResult2 = Others.GetRandomString(Others.Random(4, 10));
         Lua.LuaDoString(randomStringResult2 + " = IsInGroup(\"" + partyType + "\"); if " + randomStringResult2 + " then " + randomStringResult + " = \"1\" else " + randomStringResult + " = \"0\" end");
         string sResult = Lua.GetLocalizedText(randomStringResult);
         return(sResult == "1");
     }
     catch (Exception exception)
     {
         Logging.WriteError("GetSpellInfoLUA(string spellNameInGame): " + exception);
     }
     return(false);
 }
Exemple #3
0
 public static UInt32 GetPartyPointer(PartyEnums.PartyType partyType = PartyEnums.PartyType.LE_PARTY_CATEGORY_HOME)
 {
     try
     {
         if (partyType == PartyEnums.PartyType.None)
         {
             return(0);
         }
         return
             (Memory.WowMemory.Memory.ReadUInt(Memory.WowProcess.WowModule +
                                               (uint)
                                               ((PartyEnums.PartyType)(uint) Addresses.Party.PartyOffset +
                                                (partyType - PartyEnums.PartyType.LE_PARTY_CATEGORY_HOME) * (int)(PartyEnums.PartyType) 4)));
     }
     catch (Exception e)
     {
         Logging.WriteError("Party > GetPartyPointer(): " + e);
     }
     return(0);
 }