mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Remove trailing whitespace
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
sub EVENT_SAY
|
||||
{
|
||||
sub EVENT_SAY
|
||||
{
|
||||
if($text=~/mob/i)
|
||||
{
|
||||
my @moblist = $entity_list->GetMobList();
|
||||
@@ -8,7 +8,7 @@ sub EVENT_SAY
|
||||
$ent->Shout("I'm a mob!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($text=~/npc/i)
|
||||
{
|
||||
my @npclist = $entity_list->GetNPCList();
|
||||
@@ -17,7 +17,7 @@ sub EVENT_SAY
|
||||
$ent->Shout("I'm a npc!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($text=~/client/i)
|
||||
{
|
||||
my @clientlist = $entity_list->GetClientList();
|
||||
@@ -26,7 +26,7 @@ sub EVENT_SAY
|
||||
$ent->Shout("I'm a client!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($text=~/corpse/i)
|
||||
{
|
||||
my @corpselist = $entity_list->GetCorpseList();
|
||||
@@ -42,7 +42,7 @@ sub EVENT_SAY
|
||||
}
|
||||
quest::say("There are $index corpses in the zone and $index_two of them belong to you.");
|
||||
}
|
||||
|
||||
|
||||
if($text=~/summon/i)
|
||||
{
|
||||
my @corpselist = $entity_list->GetCorpseList();
|
||||
@@ -54,7 +54,7 @@ sub EVENT_SAY
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($text=~/rez/i)
|
||||
{
|
||||
my @corpselist = $entity_list->GetCorpseList();
|
||||
@@ -66,7 +66,7 @@ sub EVENT_SAY
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub EVENT_AGGRO_SAY
|
||||
@@ -83,7 +83,7 @@ sub EVENT_AGGRO_SAY
|
||||
{
|
||||
my $h_ent_name = $h_ent->GetName();
|
||||
quest::say("$h_ent_name is on my hate list with $h_hate hate and $h_dmg damage.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
sub EVENT_SAY {
|
||||
sub EVENT_SAY {
|
||||
if($text=~/despawn/i)
|
||||
{
|
||||
quest::disable_spawn2(10842);
|
||||
|
||||
+13
-13
@@ -27,7 +27,7 @@ while (my $ref = $sth->fetchrow_hashref()) {
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(my $i = 1; $i <= 12; $i++) {
|
||||
my $field_name = "mod_r" . $i;
|
||||
if($ref->{$field_name} != 0) {
|
||||
@@ -37,74 +37,74 @@ while (my $ref = $sth->fetchrow_hashref()) {
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r14"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r14"}, "r14");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r42"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r42"}, "r42");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r75"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r75"}, "r75");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r108"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r108"}, "r108");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r128"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r128"}, "r128");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r130"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r130"}, "r130");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r161"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r161"}, "r161");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r330"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r330"}, "r330");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r367"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r367"}, "r367");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
if($ref->{"mod_r522"} != 0) {
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{"mod_r522"}, "r522");
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
for(my $i = 201; $i <= 216; $i++) {
|
||||
my $field_name = "mod_d" . $i;
|
||||
if($ref->{$field_name} != 0) {
|
||||
my $mod_name = "d" . $i;
|
||||
my $rsth = $dbh->prepare("REPLACE INTO `faction_list_mod` (`faction_id`,`mod`,`mod_name`) VALUES(?, ?, ?)");
|
||||
$rsth->execute($ref->{id}, $ref->{$field_name}, $mod_name);
|
||||
$count++;
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ while(<F>) {
|
||||
}
|
||||
close(F);
|
||||
|
||||
my %fixes = (
|
||||
my %fixes = (
|
||||
'OP_TributeInfo' => 'OP_SendTributes',
|
||||
'OP_CancelInvite' => 'OP_GroupCancelInvite',
|
||||
'OP_GMFind' => 'OP_FindPersonRequest',
|
||||
|
||||
@@ -107,7 +107,7 @@ while(<SPELLS>) {
|
||||
}
|
||||
|
||||
my $insert1 = join("`,`", @t_col_names);
|
||||
my $insert2 = join("','", @s); #put everything in quotes & separate w/ commas for the query, plus the beginning & ending quotes. this doesn't print out to the console correctly (for me), but hopefully the query will be fine
|
||||
my $insert2 = join("','", @s); #put everything in quotes & separate w/ commas for the query, plus the beginning & ending quotes. this doesn't print out to the console correctly (for me), but hopefully the query will be fine
|
||||
my $insert = sprintf("REPLACE INTO %s (`%s`) VALUES ('%s')", $table, $insert1, $insert2);
|
||||
|
||||
printf("Loading \"%s\" (%d) \r", $s[1], $s[0]); # name (id)
|
||||
@@ -118,7 +118,7 @@ while(<SPELLS>) {
|
||||
} else {
|
||||
$loadedspells++; #to compare db inserts to total spells
|
||||
}
|
||||
|
||||
|
||||
$highid = $s[0]; #set to current id
|
||||
}
|
||||
|
||||
|
||||
+17
-17
@@ -54,12 +54,12 @@ if($mode eq "-r") {
|
||||
usage();
|
||||
}
|
||||
my $old_struct = $ARGV[1];
|
||||
|
||||
|
||||
print STDERR "Reading old player profile...\n";
|
||||
(my $old_order, my $old_fields, my $old_offsets) = readpp($old_struct, "../common/eq_old_structs.h");
|
||||
print STDERR "Reading new player profile...\n";
|
||||
(my $order, my $fields, my $offsets) = readpp("PlayerProfile_Struct", "../common/eq_packet_structs.h");
|
||||
|
||||
|
||||
compare_pps($old_order, $old_fields, $old_offsets,
|
||||
$order, $fields, $offsets);
|
||||
} elsif($mode eq "-c") {
|
||||
@@ -68,12 +68,12 @@ if($mode eq "-r") {
|
||||
}
|
||||
my $old_struct = $ARGV[1];
|
||||
my $old2_struct = $ARGV[2];
|
||||
|
||||
|
||||
print STDERR "Reading old player profile...\n";
|
||||
(my $old_order, my $old_fields, my $old_offsets) = readpp($old_struct, "../common/eq_old_structs.h");
|
||||
print STDERR "Reading old2 player profile...\n";
|
||||
(my $order, my $fields, my $offsets) = readpp($old2_struct, "../common/eq_old_structs.h");
|
||||
|
||||
|
||||
compare_pps($old_order, $old_fields, $old_offsets,
|
||||
$order, $fields, $offsets);
|
||||
} else {
|
||||
@@ -84,9 +84,9 @@ if($mode eq "-r") {
|
||||
|
||||
sub compare_pps {
|
||||
(my $old_order, my $old_fields, my $old_offsets, my $order, my $fields, my $offsets) = @_;
|
||||
|
||||
|
||||
#will not catch order changes very well for now
|
||||
|
||||
|
||||
my $last_diff = 0;
|
||||
my $first = $old_order->[0];
|
||||
my $taildrop = 0;
|
||||
@@ -101,9 +101,9 @@ sub compare_pps {
|
||||
# print STDERR "field $f was lost in new profile, it could be at $guess.\n";
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
my $diff = $offsets->{$f} - $old_offsets->{$f};
|
||||
|
||||
|
||||
if($last_diff != $diff) {
|
||||
#a change in deltas... print a rule for last block
|
||||
my $tail = $f;
|
||||
@@ -112,11 +112,11 @@ sub compare_pps {
|
||||
}
|
||||
# print "// delta change from $last_diff to $diff at field $f ($tail)\n";
|
||||
print "\t\tmemcpy(\&pp->$first, \&ops->$first, StructDist(ops, $first, $tail));\n";
|
||||
|
||||
|
||||
$first = $f;
|
||||
$last_diff = $diff;
|
||||
$taildrop = "";
|
||||
|
||||
|
||||
} else {
|
||||
#another field with the same delta...
|
||||
$final = $f;
|
||||
@@ -130,7 +130,7 @@ sub compare_pps {
|
||||
$tail = $taildrop;
|
||||
}
|
||||
print "\t\tmemcpy(\&pp->$first, \&ops->$first, StructDist(ops, $first, $tail));\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ sub readpp {
|
||||
$in = 1;
|
||||
}
|
||||
next if(!$in);
|
||||
|
||||
|
||||
if($_ =~ /\}\s*;/) {
|
||||
$in = 0;
|
||||
last;
|
||||
@@ -170,7 +170,7 @@ sub readpp {
|
||||
push(@order, $field);
|
||||
}
|
||||
close(F);
|
||||
|
||||
|
||||
open(F, ">$temp.cpp") || die("Unable to open $temp.cpp");
|
||||
print F <<"EOC";
|
||||
#include "../common/types.h"
|
||||
@@ -190,11 +190,11 @@ EOC
|
||||
}
|
||||
print F "\n\treturn(0);\n}\n\n";
|
||||
close(F);
|
||||
|
||||
|
||||
if(system("g++ $temp.cpp -I. -o $temp") != 0) {
|
||||
die("Error compiling $temp.cpp\n");
|
||||
}
|
||||
|
||||
|
||||
system("./$temp >$temp.out");
|
||||
open(F, "<$temp.out");
|
||||
while(<F>) {
|
||||
@@ -210,11 +210,11 @@ EOC
|
||||
$offsets{$1} = $2;
|
||||
}
|
||||
close(F);
|
||||
|
||||
|
||||
# unlink("$temp.cpp");
|
||||
# unlink("$temp.out");
|
||||
# unlink("$temp");
|
||||
|
||||
|
||||
return(\@order, \%fields, \%offsets);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user