public static bool RemoveShakedownPerson_Prefix(Agent shookDownAgent, int shakedownAmount, ObjectMult __instance) { return(Warlord.ObjectMult_RemoveShakedownPerson_Prefix(__instance)); }
public static bool ObjectMult_RemoveShakedownPerson_Prefix(ObjectMult instance) { // Intercept ShakedownFail XP loss for Warlord if not Extortionist return(!instance.agent.HasTrait <Warlord>() || instance.agent.HasTrait(vTrait.Extortionist) || instance.agent.HasTrait(vTrait.Extortionist_2)); }
public static void buffEverybody(string id) { ObjectMult server = null; List <Agent> players = new List <Agent>(); foreach (Agent a in GameController.gameController.agentList) { if (a.isPlayer != 0) { players.Add(a); } if (a.isPlayer != 0 && a.objectMult.isServer) { server = a.objectMult; } } foreach (Agent a in players) { if (activated) { a.statusEffects.RemoveStatusEffect(id); } else { GameController.gameController.playerAgent.objectMult.CallCmdAddStatusEffect(id, a.objectNetID, true, true, 5); a.statusEffects.AddStatusEffect(id, a, a, a.objectMult.IsFromClient(), true, 1); // RedNetwork.AddStatusEffectOthers(id, true, GameController.gameController.playerAgent, a, GameController.gameController.playerAgent.objectMult.IsFromClient(), true, -1); //a.objectMult.AddStatusEffect(id, true, a, a.objectMult.IsFromClient(), true, -1); //a.objectMult.CallCmdAddStatusEffect(id, a.objectNetID, true, true, 5); //a.objectMult.CallRpcAddStatusEffect(id, a.objectNetID, true, a.objectMult.IsFromClient(), true, 5); //a.objectMult.AddStatusEffect(id,true,thisAgent,thisAgent.objectMult.IsFromClient(),true,-1); //Debug.Log("server:" + a.objectMult.ToString()); /* if (!thisAgent.objectMult.gc.serverPlayer && thisAgent.objectMultAgent.isLocalPlayer && thisAgent.objectMult.IsFromClient() != NetworkInstanceId.Invalid) * { * a.objectMult.CallCmdAddStatusEffect(id, thisAgent.objectNetID, true, true, 5); * Debug.Log("CmdAddStatusEffect: " + id); * } * else if (thisAgent.objectMult.gc.serverPlayer) * { * thisAgent.objectMult.CallRpcAddStatusEffect(id, thisAgent.objectNetID, true, thisAgent.objectMult.IsFromClient(), true, 5); * Debug.Log("RpcAddStatusEffect: " + id); * }*/ //thisAgent.objectMult.CallRpcAddStatusEffect(id, a.objectMult.IsFromClient(), true, a.objectMult.IsFromClient(), false, 5); //Debug.Log("RpcAddStatusEffect: " + id); //a.statusEffects.AddStatusEffect(id); //a.statusEffects.ChangeStatusEffectTime(id, 10); //a.objectMult.AddStatusEffect(id,true,thisAgent,a.objectMult.IsFromClient(),false,-1); //a.objectMult.CallCmdAddStatusEffect(id, a.objectMult.IsFromClient(),true, false, -1); } } activated = !activated; }