void CCharacter::ClassSpawnAttributes() { switch(GetClass()) { case PLAYERCLASS_ENGINEER: m_Health = 10; GiveWeapon(WEAPON_HAMMER, -1); GiveWeapon(WEAPON_GUN, 10); GiveWeapon(WEAPON_RIFLE, 10); m_ActiveWeapon = WEAPON_RIFLE; GameServer()->SendBroadcast("Engineer : Can build wall with hammer", m_pPlayer->GetCID()); break; case PLAYERCLASS_SOLDIER: m_Health = 10; GiveWeapon(WEAPON_HAMMER, -1); GiveWeapon(WEAPON_GUN, 10); GiveWeapon(WEAPON_GRENADE, 10); m_ActiveWeapon = WEAPON_GRENADE; GameServer()->SendBroadcast("Soldier : Can pose remote bombs with hammer, and recharge it with grenades", m_pPlayer->GetCID()); break; case PLAYERCLASS_MEDIC: m_Health = 10; GiveWeapon(WEAPON_HAMMER, -1); GiveWeapon(WEAPON_GUN, 10); GiveWeapon(WEAPON_SHOTGUN, 10); m_ActiveWeapon = WEAPON_SHOTGUN; GameServer()->SendBroadcast("Medic : Can cure infected", m_pPlayer->GetCID()); break; case PLAYERCLASS_NONE: m_Health = 10; GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; break; case PLAYERCLASS_ZOMBIE: m_Health = 10; RemoveAllGun(); GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; GameServer()->SendBroadcast("Zombie : Drain health by hooking players", m_pPlayer->GetCID()); break; case PLAYERCLASS_BOOMER: m_Health = 10; RemoveAllGun(); GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; GameServer()->SendBroadcast("Boomer : Can only perform kamikaze attack", m_pPlayer->GetCID()); break; case PLAYERCLASS_HUNTER: m_Health = 10; RemoveAllGun(); GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; GameServer()->SendBroadcast("Hunter : Has triple jump", m_pPlayer->GetCID()); break; } }
void CCharacter::ClassSpawnAttributes() { switch(GetClass()) { case PLAYERCLASS_ENGINEER: m_pPlayer->m_InfectionTick = -1; m_Health = 10; GiveWeapon(WEAPON_HAMMER, -1); GiveWeapon(WEAPON_GUN, 10); GiveWeapon(WEAPON_RIFLE, 10); m_ActiveWeapon = WEAPON_RIFLE; if(!m_pPlayer->IsKownClass(PLAYERCLASS_ENGINEER)) { GameServer()->SendBroadcast("You are a human: Engineer!", m_pPlayer->GetCID()); GameServer()->SendChatTarget(m_pPlayer->GetCID(), "Tip: Build walls with your hammer!"); m_pPlayer->m_knownClass[PLAYERCLASS_ENGINEER] = true; } break; case PLAYERCLASS_SOLDIER: m_pPlayer->m_InfectionTick = -1; m_Health = 10; GiveWeapon(WEAPON_HAMMER, -1); GiveWeapon(WEAPON_GUN, 10); GiveWeapon(WEAPON_GRENADE, 10); m_ActiveWeapon = WEAPON_GRENADE; if(!m_pPlayer->IsKownClass(PLAYERCLASS_SOLDIER)) { GameServer()->SendBroadcast("You are a human: Soldier!", m_pPlayer->GetCID()); GameServer()->SendChatTarget(m_pPlayer->GetCID(), "Tip: Build bombs with your hammer!"); m_pPlayer->m_knownClass[PLAYERCLASS_SOLDIER] = true; } break; case PLAYERCLASS_MEDIC: m_pPlayer->m_InfectionTick = -1; m_Health = 10; GiveWeapon(WEAPON_HAMMER, -1); GiveWeapon(WEAPON_GUN, 10); GiveWeapon(WEAPON_SHOTGUN, 10); m_ActiveWeapon = WEAPON_SHOTGUN; if(!m_pPlayer->IsKownClass(PLAYERCLASS_MEDIC)) { GameServer()->SendBroadcast("You are a human: Medic!", m_pPlayer->GetCID()); GameServer()->SendChatTarget(m_pPlayer->GetCID(), "Tip: Cure infected humans!"); m_pPlayer->m_knownClass[PLAYERCLASS_MEDIC] = true; } break; case PLAYERCLASS_NONE: m_pPlayer->m_InfectionTick = -1; m_Health = 10; GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; break; case PLAYERCLASS_ZOMBIE: m_Health = 10; m_Armor = 0; RemoveAllGun(); GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; if(!m_pPlayer->IsKownClass(PLAYERCLASS_ZOMBIE)) { //normal zombie? GameServer()->SendBroadcast("You are a zombie: Normal!", m_pPlayer->GetCID()); GameServer()->SendChatTarget(m_pPlayer->GetCID(), "Tip: Hit by hooking others!"); m_pPlayer->m_knownClass[PLAYERCLASS_ZOMBIE] = true; } break; case PLAYERCLASS_BOOMER: m_Health = 10; m_Armor = 0; RemoveAllGun(); GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; if(!m_pPlayer->IsKownClass(PLAYERCLASS_BOOMER)) { GameServer()->SendBroadcast("You are a zombie: Boomer!", m_pPlayer->GetCID()); GameServer()->SendChatTarget(m_pPlayer->GetCID(), "Tip: You can only do kamikaze attacks!"); m_pPlayer->m_knownClass[PLAYERCLASS_BOOMER] = true; } break; case PLAYERCLASS_HUNTER: m_Health = 10; m_Armor = 0; RemoveAllGun(); GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; if(!m_pPlayer->IsKownClass(PLAYERCLASS_HUNTER)) { GameServer()->SendBroadcast("You are a zombie: Hunter!", m_pPlayer->GetCID()); GameServer()->SendChatTarget(m_pPlayer->GetCID(), "Tip: You can jump three times!"); m_pPlayer->m_knownClass[PLAYERCLASS_HUNTER] = true; } break; case PLAYERCLASS_WITCH: m_Health = 10; m_Armor = 10; RemoveAllGun(); GiveWeapon(WEAPON_HAMMER, -1); m_ActiveWeapon = WEAPON_HAMMER; if(!m_pPlayer->IsKownClass(PLAYERCLASS_WITCH)) { GameServer()->SendBroadcast("You are a... Witch!!", m_pPlayer->GetCID()); GameServer()->SendChatTarget(m_pPlayer->GetCID(), "Tip: Zombies may spawn near you!"); m_pPlayer->m_knownClass[PLAYERCLASS_WITCH] = true; } break; } }