Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "StdAfx.h"
- #include "Setup.h"
- #define NPC_ID 56099
- class RaceChanger : public GossipScript
- {
- public:
- void GossipHello(Object* pObject, Player * Plr, bool AutoSend)
- {
- GossipMenu *Menu;
- objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 40002, Plr);
- if(Plr->GetSession()->CanUseCommand('z'))
- {
- Menu->AddItem( 0, "Change my Race", 1 );
- }
- else
- {
- Menu->AddItem(0, "You can not use this right now!", 3);
- }
- if(AutoSend)
- Menu->SendTo(Plr);
- }
- void GossipSelectOption(Object* pObject, Player * Plr, uint32 Id, uint32 IntId, const char * Code)
- {
- Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
- if(pCreature==NULL)
- return;
- GossipMenu *Menu;
- switch(IntId)
- {
- case 1:
- {
- objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
- Menu->AddItem( 0, "Change me Into Human", 4 );
- Menu->AddItem( 0, "Change me Into NightElf", 5 );
- Menu->AddItem( 0, "Change me Into Dwarf", 6 );
- Menu->AddItem( 0, "Change me Into Gnome", 7 );
- Menu->AddItem( 0, "Change me Into Draenei", 8 );
- Menu->AddItem( 0, "Change me Into Orc", 10 );
- Menu->AddItem( 0, "Change me Into Undead", 11 );
- Menu->AddItem( 0, "Change me Into Tauren", 12 );
- Menu->AddItem( 0, "Change me Into Troll", 13 );
- Menu->AddItem( 0, "Change me Into BloodElf", 14 );
- Menu->SendTo(Plr);
- }break;
- case 4: // Human
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 1;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- //dump reputation data
- ReputationMap m_tempRepMap;
- //store neutral
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- //remove racial spells along with all starting spells then add them for new race
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 5: // Nightelf
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 4;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- //dump reputation data
- ReputationMap m_tempRepMap;
- //store neutral
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- // dont store side related factions
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 6:// Dwarf
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 3;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- //dump reputation data
- ReputationMap m_tempRepMap;
- //store neutral
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- // dont store side related factions
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 7: // Gnome
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 7;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- ReputationMap m_tempRepMap;
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- // dont store side related factions
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 && //HH/thrallmar
- f->ID != 892 && f->ID != 891 && //h/a Forces
- f->ID != 941 && f->ID != 978 && //Mag'har / Kurenai
- f->ID != 922 //Tranquillien
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 8: // Draenei
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 11;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- //dump reputation data
- ReputationMap m_tempRepMap;
- //store neutral
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- // dont store side related factions
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 10: // Orc
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 2;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- ReputationMap m_tempRepMap;
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 11: // Undead
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 5;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- ReputationMap m_tempRepMap;
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 12:
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 6;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- ReputationMap m_tempRepMap;
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 13:
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 8;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- ReputationMap m_tempRepMap;
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0)
- continue;
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- case 14:
- {
- sChatHandler.SystemMessage(Plr->GetSession(), "MUHAHAHA ...");
- uint32 team = Plr->GetTeam();
- race_old = race = 10;
- class_ = Plr->getClass();
- gender = Plr->getGender();
- powertype = Plr->GetPowerType();
- Plr->SetTeam( team ? 0 : 1 );
- PlayerCreateInfo *info = objmgr.GetPlayerCreateInfo(race, class_);
- if (!info)
- break;
- Plr->SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f));
- Plr->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate );
- Plr->SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) );
- if(race != RACE_BLOODELF)
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId + gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId + gender );
- }
- else
- {
- Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, info->displayId - gender );
- Plr->SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, info->displayId - gender );
- }
- // Different races have different number of visuals
- Plr->SetUInt32Value(PLAYER_BYTES, ((RandomUInt(5))|(RandomUInt(5)<<8)|(RandomUInt(5)<<16)|(RandomUInt(5)<<24)));
- Plr->SetUInt32Value(PLAYER_BYTES_2, (( !gender ? 0 : RandomUInt(3) ) | (0x02 << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES, ((skin) | (face << 8) | (hairStyle << 16) | (hairColor << 24)));
- //Plr->SetUInt32Value(PLAYER_BYTES_2, (facialHair | (0x02 << 24)));
- Plr->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, 0xEEEEEEEE);
- //dump reputation data
- ReputationMap m_tempRepMap;
- //store neutral
- for(uint32 i = 0; i < dbcFaction.GetNumRows(); ++i)
- {
- FactionDBC * f = dbcFaction.LookupRow(i);
- if(f == 0) continue;
- if( Plr->GetStanding(f->ID) &&
- f->parentFaction != 67 && f->parentFaction != 469 &&
- f->parentFaction != 892 && f->parentFaction != 891 &&
- f->ID != 947 && f->ID != 946 &&
- f->ID != 892 && f->ID != 891 &&
- f->ID != 941 && f->ID != 978 &&
- f->ID != 922
- )
- {
- FactionReputation * rep = new FactionReputation;
- rep->flag = 0;
- rep->standing = Plr->GetStanding(f->ID);
- rep->baseStanding = Plr->GetBaseStanding(f->ID);
- m_tempRepMap[f->ID] = rep;
- }
- }
- Plr->_InitialReputation();
- for(ReputationMap::iterator itr = m_tempRepMap.begin(); itr != m_tempRepMap.end(); ++itr)
- {
- Plr->SetStanding(itr->first, itr->second->standing );
- //delete itr->second;
- }
- Plr->_RemoveLanguages();
- PlayerCreateInfo * old_info = objmgr.GetPlayerCreateInfo(race_old, class_);
- if (!old_info) break;
- for(std::set<uint32>::iterator sp = old_info->spell_list.begin(); sp!=old_info->spell_list.end(); sp++)
- if (Plr->HasSpell(*sp)) Plr->removeSpell((*sp), false, false, 0);
- for(std::set<uint32>::iterator sp = info->spell_list.begin(); sp!=info->spell_list.end(); sp++)
- Plr->addSpell(*sp);
- if (Plr->GetGuildId())
- {
- Guild *pGuild = objmgr.GetGuild( Plr->GetGuildId() );
- if(pGuild && pGuild->GetGuildLeader() != Plr->GetGUID() )
- {
- Plr->SetGuildId(0);
- Plr->SetGuildRank(0);
- pGuild->RemoveGuildMember(Plr->m_playerInfo, NULL);
- WorldPacket data(100);
- data.Initialize(SMSG_GUILD_EVENT);
- data << uint8(GUILD_EVENT_LEFT);
- data << uint8(1);
- data << Plr->GetName();
- pGuild->SendPacket(&data);
- }
- }
- Plr->SaveToDB(false);
- sChatHandler.SystemMessage(Plr->GetSession(), "Signed in blood. There is no going back now ...");
- sChatHandler.SystemMessage(Plr->GetSession(), "Relog ...");
- //force relog
- Plr->Kick(5000);
- Plr->Gossip_Complete();
- }break;
- }
- };
- void Destroy()
- {
- delete this;
- }
- private:
- uint8 race, race_old, class_,gender,powertype/*,skin,face,hairStyle,hairColor,facialHair*/;
- };
- void SetupRaceChangeScript(ScriptMgr * mgr)
- {
- GossipScript * RCA = (GossipScript*) new RaceChanger();
- mgr->register_gossip_script(NPC_ID, RCA);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement