Merge git://github.com/EQEmu/Server into Development

This commit is contained in:
KayenEQ 2014-11-28 01:07:55 -05:00
commit 94a0cb3522
2 changed files with 7 additions and 7 deletions

View File

@ -901,21 +901,21 @@ bool Database::CheckDatabaseConversions() {
CheckDatabaseConvertCorpseDeblob(); CheckDatabaseConvertCorpseDeblob();
/* Fetch Automatic Database Upgrade Script */ /* Fetch Automatic Database Upgrade Script */
if (!std::ifstream("db_update.pl")){ // if (!std::ifstream("db_update.pl")){
std::cout << "Pulling down automatic database upgrade script...\n" << std::endl; std::cout << "Pulling down automatic database upgrade script...\n" << std::endl;
#ifdef _WIN32 #ifdef _WIN32
system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/db_update.pl'); if ($response->is_success){ open(FILE, '> db_update.pl'); print FILE $response->decoded_content; close(FILE); }\""); system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/db_update.pl'); if ($response->is_success){ open(FILE, '> db_update.pl'); print FILE $response->decoded_content; close(FILE); }\"");
#else #else
system("wget -O db_update.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/db_update.pl"); system("wget -O db_update.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/db_update.pl");
#endif #endif
} // }
/* /*
Automatic Database Upgrade Script Automatic Database Upgrade Script
Script: db_updater.pl V 1 - the number that world passes to the script will Script: db_update.pl V 1 - the number that world passes to the script will
force the script to check for a newer version to update itself with force the script to check for a newer version to update itself with
db_updater.pl ran_from_world - won't bring up a menu if your database versions match db_update.pl ran_from_world - won't bring up a menu if your database versions match
db_updater.pl - ran standalone will bring up a menu prompt db_update.pl - ran standalone will bring up a menu prompt
*/ */
/* Check for a new version of this script, the arg passed /* Check for a new version of this script, the arg passed

View File

@ -283,7 +283,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
} }
container = inst; container = inst;
if (container->GetItem()->BagType == BagTypeTransformationmold) { if (container->GetItem() && container->GetItem()->BagType == BagTypeTransformationmold) {
const ItemInst* inst = container->GetItem(0); const ItemInst* inst = container->GetItem(0);
bool AllowAll = RuleB(Inventory, AllowAnyWeaponTransformation); bool AllowAll = RuleB(Inventory, AllowAnyWeaponTransformation);
if (inst && ItemInst::CanTransform(inst->GetItem(), container->GetItem(), AllowAll)) { if (inst && ItemInst::CanTransform(inst->GetItem(), container->GetItem(), AllowAll)) {
@ -304,7 +304,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
return; return;
} }
if (container->GetItem()->BagType == BagTypeDetransformationmold) { if (container->GetItem() && container->GetItem()->BagType == BagTypeDetransformationmold) {
const ItemInst* inst = container->GetItem(0); const ItemInst* inst = container->GetItem(0);
if (inst && inst->GetOrnamentationIcon() && inst->GetOrnamentationIcon()) { if (inst && inst->GetOrnamentationIcon() && inst->GetOrnamentationIcon()) {
const Item_Struct* new_weapon = inst->GetItem(); const Item_Struct* new_weapon = inst->GetItem();