public string GetKillOtherPlayerMessage(PlayerCharacterObject player, NebulaObject enemy) { MmoWorld world = player.nebulaObject.mmoWorld(); RaceableObject playerRaceable = player.GetComponent <RaceableObject>(); PlayerCharacterObject enemyCharacter = enemy.GetComponent <PlayerCharacterObject>(); RaceableObject enemyRaceable = enemy.GetComponent <RaceableObject>(); string systemName = world.Resource().Zones.GetZoneName(world.Name); string playerName = player.characterName; string playerRaceName = world.Resource().Zones.GetRaceName(playerRaceable.getRace()); string sourceCoalitionName = player.guildName; if (sourceCoalitionName == null) { sourceCoalitionName = string.Empty; } string enemyName = enemyCharacter.characterName; string enemyRaceName = world.Resource().Zones.GetRaceName(enemyRaceable.getRace()); string enemyCoalitionName = enemyCharacter.guildName; if (enemyCoalitionName == null) { enemyCoalitionName = string.Empty; } return(string.Format("scm11:zone={0};chname={1};chrace={2};chcoal={3};enname={4};enrace={5};encoal={6}", world.Name, playerName, playerRaceable.race, sourceCoalitionName, enemyName, enemyRaceable.race, enemyCoalitionName)); }
private ServerInventoryItem GiveTurretReward(MmoActor player, ContractTurretDataReward turretReward) { RaceableObject raceableComponent = player.GetComponent <RaceableObject>(); if (raceableComponent != null) { TurretInventoryObject turretInventoryObject = new TurretInventoryObject(raceableComponent.race); return(new ServerInventoryItem(turretInventoryObject, turretReward.count)); } return(null); }
public override void Start() { base.Start(); m_Pet = GetComponent <PetObject>(); m_Target = GetComponent <PlayerTarget>(); m_Message = GetComponent <MmoMessageComponent>(); m_Race = GetComponent <RaceableObject>(); if (m_Pet) { if (m_Pet.info != null) { m_Timer = m_Pet.info.Cooldown(nebulaObject.resource.petParameters.cooldown); } } }
private void AddPetSchemeToNewPlayer() { if (mRace == null) { mRace = GetComponent <RaceableObject>(); } Race race = (Race)mRace.race; string petModel = resource.petParameters.defaultModels[race]; if (petModel != null) { var petScheme = new PetSchemeObject(petModel, PetColor.gray); Station.StationInventory.Add(petScheme, 1); } EventOnStationHoldUpdated(); }
public string GetStartAttackMessage(PlayerCharacterObject player, NebulaObject enemy) { MmoWorld world = player.nebulaObject.mmoWorld(); RaceableObject playerRaceable = player.GetComponent <RaceableObject>(); CharacterObject enemyCharacter = enemy.GetComponent <CharacterObject>(); BotObject botObject = enemy.GetComponent <BotObject>(); string systemName = world.Resource().Zones.GetZoneName(world.Name); string playerName = player.characterName; //string playerRaceName = world.Resource().Zones.GetRaceName(playerRaceable.getRace()); string npcName = GenerateStandardNpcName(systemName, enemy.Id); int npcLevel = enemyCharacter.level; string coalitionName = player.guildName; if (coalitionName == null) { coalitionName = string.Empty; } switch (botObject.getSubType()) { case BotItemSubType.Drill: return(string.Format("scm4:zone={0};chname={1};chrace={2};chcoal={3};enname={4};enlvl={5}", world.Name, playerName, playerRaceable.race, coalitionName, npcName, npcLevel)); case BotItemSubType.Outpost: return(string.Format("scm5:zone={0};chname={1};chrace={2};chcoal={3};enname={4};enlvl={5}", world.Name, playerName, playerRaceable.race, coalitionName, npcName, npcLevel)); case BotItemSubType.MainOutpost: return(string.Format("scm6:zone={0};chname={1};chrace={2};chcoal={3};enname={4};enlvl={5}", world.Name, playerName, playerRaceable.race, coalitionName, npcName, npcLevel)); default: return(string.Empty); } }
public string GetSetMiningStationMessage(PlayerCharacterObject player) { MmoWorld world = player.nebulaObject.mmoWorld(); RaceableObject playerRaceable = player.GetComponent <RaceableObject>(); string playerName = player.characterName; string coalitionName = player.guildName; if (coalitionName == null) { coalitionName = string.Empty; } return(string.Format("scm1:zone={0};chname={1};chrace={2};chcoal={3}", world.Name, playerName, playerRaceable.race, coalitionName )); }
public override void Start() { if (!m_StartCalled) { m_StartCalled = true; mShip = RequireComponent <PlayerShip>(); mTarget = RequireComponent <PlayerTarget>(); mCharacter = RequireComponent <PlayerCharacterObject>(); mAI = RequireComponent <AIState>(); mRace = RequireComponent <RaceableObject>(); mMessage = RequireComponent <MmoMessageComponent>(); mDamagable = RequireComponent <ShipBasedDamagableObject>(); mWeapon = RequireComponent <ShipWeapon>(); mSkills = RequireComponent <PlayerSkills>(); mBonuses = RequireComponent <PlayerBonuses>(); mPassiveBonuses = GetComponent <PassiveBonusesComponent>(); mCharacter.SetCharacterId((string)nebulaObject.Tag((byte)PlayerTags.CharacterId)); mCharacter.SetCharacterName((string)nebulaObject.Tag((byte)PlayerTags.Name)); printPropertiesTimer = printPropertiesInterval; if (application.serverActors.ContainsKey(nebulaObject.Id)) { MmoActor old; if (application.serverActors.TryRemove(nebulaObject.Id, out old)) { log.Info("successfully remove actor before replacing with new [red]"); } } if (application.serverActors.TryAdd(nebulaObject.Id, this)) { log.Info("successfully added actor to server actors [red]"); } //create chest on killing when player die mDamagable.SetCreateChestOnKilling(true); mDamagable.SetIgnoreDamageInterval(30); mDamagable.SetIgnoreDamageAtStart(true); } }
public string GetSetOutpostMessage(PlayerCharacterObject player) { MmoWorld world = player.nebulaObject.mmoWorld(); RaceableObject playerRaceable = player.GetComponent <RaceableObject>(); string systemName = world.Resource().Zones.GetZoneName(world.Name); string playerName = player.characterName; string playerRaceName = world.Resource().Zones.GetRaceName(playerRaceable.getRace()); string coalitionName = player.guildName; if (coalitionName == null) { coalitionName = string.Empty; } return(string.Format("scm3:zone={0};chname={1};chrace={2};chcoal={3}", systemName, playerName, playerRaceable.race, coalitionName )); }
public override void Start() { base.Start(); m_RaceComponent = GetComponent <RaceableObject>(); }