| 735 | if(sWorld.getConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when logging in |
| 736 | pCurrChar->UpdateSkillsToMaxSkillsForLevel(); |
| 737 | |
| 738 | //ImpConfig - Check if player has logged in before |
| 739 | QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM has_logged_in_before WHERE guid = %u",pCurrChar->GetGUIDLow()); |
| 740 | if(!result) |
| 741 | { |
| 742 | sLog.outBasic("Character '%s' logging in for first time, applying skills and stuff",pCurrChar->GetName()); |
| 743 | CharacterDatabase.PExecute("INSERT INTO has_logged_in_before VALUES (%u)",pCurrChar->GetGUIDLow()); |
| 744 | |
| 745 | //Reputations if "StartAllReputation" is enabled, -- TODO: Fix this in a better way |
| 746 | if(sWorld.getConfig(CONFIG_START_ALL_REP)) |
| 747 | { |
| 748 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(942),42999); |
| 749 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(935),42999); |
| 750 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(936),42999); |
| 751 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1011),42999); |
| 752 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(970),42999); |
| 753 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(967),42999); |
| 754 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(989),42999); |
| 755 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(932),42999); |
| 756 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(934),42999); |
| 757 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1038),42999); |
| 758 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1077),42999); |
| 759 | |
| 760 | // Factions depending on team, like cities and some more stuff |
| 761 | switch(pCurrChar->GetTeam()) |
| 762 | { |
| 763 | case ALLIANCE: |
| 764 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(72),42999); |
| 765 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(47),42999); |
| 766 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(69),42999); |
| 767 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(930),42999); |
| 768 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(730),42999); |
| 769 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(978),42999); |
| 770 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(54),42999); |
| 771 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(946),42999); |
| 772 | break; |
| 773 | case HORDE: |
| 774 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(76),42999); |
| 775 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(68),42999); |
| 776 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(81),42999); |
| 777 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(911),42999); |
| 778 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(729),42999); |
| 779 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(941),42999); |
| 780 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(530),42999); |
| 781 | pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(947),42999); |
| 782 | break; |
| 783 | } |
| 784 | } |
| 785 | } |
| 786 | else |
| 787 | sLog.outBasic("Character '%s' has logged in before",pCurrChar->GetName()); |
| 788 | |
| 789 | if(sWorld.getConfig(CONFIG_START_ALL_TAXI)) |
| 790 | pCurrChar->SetTaxiCheater(true); |
| 791 | |
| 792 | |